in reply to How to list files in dir with respect to time ?
I personally do not like to use the UNIX native commands in script.That's a pity, since it means you can solve your problem in a single line - and you don't have to ask for a solution. It's also non-Perl, after all, Perl is a glue language.
The roll it your own solution involves using opendir, readdir, stat, sort and printf. You also need getpwnam and getgrnam if you want to similate the -l option of ls, and perhaps grep to filter out dot-files, although that can be done with other means as well. I hope that's enough answer for you, and you can work out the details - I won't bother with them, if
works just as well.system "ls -lrt";
UNIX Monk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to list files in dir with respect to time ?
by fraterm (Scribe) on Aug 16, 2005 at 14:33 UTC | |
by fraterm (Scribe) on Aug 16, 2005 at 16:27 UTC |