@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}
In reply to Re: read directory
by shmem
in thread read directory
by Zcity
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |