diff --git a/finddup2 b/finddup2 index 73a2b7a..17fb517 100755 --- a/finddup2 +++ b/finddup2 @@ -6,7 +6,7 @@ finddup - yet another tool for finding duplicates =cut -use v5.10; +use v5.20; no autovivification 'fetch'; use File::Find; use File::stat; @@ -25,11 +25,11 @@ find(sub { unless ($haystack->{$size}{$hash}) { $haystack->{$size}{$hash} = []; } - push $haystack->{$size}{$hash}, { path => $File::Find::name, - size => $size, - dev => $st->dev, - ino => $st->ino, - }; + push $haystack->{$size}{$hash}->@*, { path => $File::Find::name, + size => $size, + dev => $st->dev, + ino => $st->ino, + }; } }, $haystackdir @@ -50,7 +50,7 @@ find( unless ($haystack->{$size}{$hash}) { $haystack->{$size}{$hash} = []; } - push $haystack->{$size}{$hash}, $file; + push $haystack->{$size}{$hash}->@*, $file; } delete $haystack->{$size}{""}; }