Next The Perl Hardware Store DC.pm Version 5

Schwartzian Transform

         @names = readdir D;

         @names_and_dates = 
           map { { NAME => $_, DATE => -M $_ } } 
           @names;

         @sorted_names_and_dates = 
           sort { $b->{DATE} <=> $a->{DATE} } 
           @names_and_dates;

         @sorted_names = 
           map { $_->{NAME} } 
           @sorted_names_and_dates;



Next Copyright © 2003 M. J. Dominus