For readability, s/;/;\n/g. From an error message it seems Slashdot is hostile to small lines in posts. The original is 73 lines.
#!/usr/bin/env perl
use strict;
use Digest::SHA;
use Cwd;
use File::Util;
my $topDir=cwd();
my($f) = File::Util->new();
my(@files) = $f->list_dir($topDir,'--recurse');
my %hash;
my $deleteFlag=$ARGV[0];
#print $deleteFlag,"\n";
foreach my $file(@files) {
if(-d $file) {next;}
my $size=$f->size($file);
push @{$hash{$size}},$file;
}
my ($filectr,$setctr)=(0,0);
foreach my $key (sort { $a $b } keys %hash) {#loop through sizes
my $value=$hash{$key};
my @arr=@{$value};
my $numFiles = @arr;
if ($numFiles $b } keys %shahash) { #loop through files of same hash value
my $shavalue=$shahash{$shakey};
my @shaarr=@{$shavalue};
my $numFilesSha = @shaarr;
if($numFilesSha new($alg);
$sha->addfile($filename);
my $digest = $sha->hexdigest();
return $digest;
}
sub unixFilename {
my ($filename) = @_;
$filename =~ s/\)/\\\)/g;
$filename =~ s/\(/\\\(/g;
$filename =~ s/\
We are each entitled to our own opinion, but no one is entitled to his own facts. -- Patrick Moynihan