in reply to read directory
@files = sort {-M $a <=> -M $b} <*>; # update - better without -M in sort opendir(D,$dir); @files = map { $_->[1] } sort { $a->[0] <=> $b->[0] } map { [-M $_, $_] } grep {!/^\.\.?$/} readdir(D);
A related thread is here.
--shmem
update: added ST after reading TedPride's post ;-)
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ / /\_¯/(q / ---------------------------- \__(m.====·.(_("always off the crowd"))."· ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: read directory
by jbisbee (Pilgrim) on Jul 08, 2006 at 14:12 UTC | |
by shmem (Chancellor) on Jul 08, 2006 at 14:28 UTC | |
by Hue-Bond (Priest) on Jul 08, 2006 at 14:33 UTC |