in reply to •Re: Keeping only the $n newest files/directories in a diretory?
in thread Keeping only the $n newest files/directories in a diretory?
(ST)
Is the ST really worth the effort here? On my system, in a directory with 20000 files, there is no noticable difference between
andmy @newest_first = map $_->[0], sort { $a->[1] <=> $b->[1] } map [$_, -M], <*>;
while the first one took me much longer to type in.my @newest_first = sort { -M $a <=> -M $b } <*>;
Most directories on my systems don't even have twenty thousand files :)
Juerd
- http://juerd.nl/
- spamcollector_perlmonks@juerd.nl (do not use).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: •Re: Keeping only the $n newest files/directories in a diretory?
by halley (Prior) on Apr 19, 2003 at 13:45 UTC | |
by Juerd (Abbot) on Apr 19, 2003 at 13:51 UTC |