for $_ (`locate $ARGV[0]`) { chop; -M and $f{$_}=$^T-(3600*24*(-M _)); } for $x (sort { $f{$a} <=> $f{$b} } keys %f) { printf "%s $x\n", scalar localtime($f{$x}); }