in reply to Re^3: How do I traverse the files in descending order of modification using File::Find
in thread How do I traverse the files in descending order of modification using File::Find
find( {wanted=> \&wanted, preprocess => \&preprocess }, #Added this line thats it '.'); #Added this function as well sub preprocess { my %afiletimes; foreach(@_) { $afiletimes{$_} = -M $_ if -f ; } @_ = sort { $afiletimes{$b} <=> $afiletimes{$a} } keys %afiletimes; }
|
|---|