http://qs321.pair.com?node_id=49841


in reply to Find Duplicate Files

I don't like the package %files there. You can get rid of it by passing a closure to File::Find...
sub find_duplicate_files { my %dupes; my %files; find sub { -f && push @{$files{(stat(_))[7]}}, $File::Find::name; }, shift || "."; .... }
Much cleaner. Easier to maintain. Smaller locality of reference. Blah blah blah. {grin}

-- Randal L. Schwartz, Perl hacker