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
In reply to Re: How to list files in dir with respect to time ?
by Anonymous Monk
in thread How to list files in dir with respect to time ?
by swaroop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |