| Next | Program Repair Shop | 30 |
foreach $md5sum (keys %file_name_by_md5sum)
{
my @files = @{$file_name_by_md5sum{$md5sum}};
push @md5_LoL , \@files
if ( scalar (@files) > 1);
# do NOT push single file lists, there's nothing to match!
print STDERR "jsjvv: md5sum found " .
scalar (@files) . " matches\n"
if ($verbose1) && ( scalar (@filesg) > 1);
}
I said I don't care about making it perfect
That's true
I'm interested in making it better with as little effort as possible
We still have some repeated code:
foreach $md5sum (keys %file_name_by_md5sum)
{
my @files = @{$file_name_by_md5sum{$md5sum}};
if (scalar (@files) > 1) {
# do NOT push single file lists, there's nothing to match!
push @md5_LoL , \@files;
print STDERR "jsjvv: md5sum found " .
scalar (@files) . " matches\n"
if ($verbose1);
}
}
Why write (and execute) the scalar(@files) > 1 test twice?
| Next | ![]() |
Copyright © 2006 M. J. Dominus |