Help for this page
my @sorted = map { $_->[0]} sort { $b->[1] <=> $a->[1] } map { [ $_, (stat $_)[9] ] } @allfiles;
my %h; foreach $file (sort { ($h{$a} ||= (stat $a)[9]) <=> ($h{$b} ||= (stat $b)[9]) } @allfiles) { ...;