http://qs321.pair.com?node_id=484170


in reply to Re: How to list files in dir with respect to time ?
in thread How to list files in dir with respect to time ?

You could use the Orcish Maneuver to make your code go faster...

# Original code for ( sort { -M $a <=> -M $b } glob ... ) # Orcish Maneuver my %t; for ( sort { ($t{$a} ||= -M $a) <=> ($t{$b} ||= -M $b) } glob ... )