App-SortCopies
view release on metacpan or search on metacpan
lib/App/SortCopies.pm view on Meta::CPAN
my %fried;
for my $file (@unsorted_stuff) {
my $path = File::Spec->catfile($src, $file);
open(my $potato, '<', $path) or do {
warn "I couldn't open '$file'\n";
next;
};
binmode($potato);
my $hash = Digest::MD5->new->addfile($potato)->hexdigest;
close($potato);
if ($fried{$hash}) {
my $dest = File::Spec->catfile($dup_dir, $file);
my $i = 1;
my ($name, undef, $ext) = fileparse($file, qr/\.[^.]*/);
$dest = File::Spec->catfile(
( run in 0.773 second using v1.01-cache-2.11-cpan-140bd7fdf52 )