in reply to Sort files by oldest timestamp
First, I would suggest using /, forward slash instead of \\. This is portable and will work on Windows.
Now, what do you you think this does?
This looks pretty good, but readdir doesn't give a full path..@files is just some names within the $srcdir. If you want to use @files, and do some kind of a test like -M, you will need to prepend the $srcdir to get a full path name!opendir(DIR, $srcdir) or die "Can't open $srcdir: $!"; my @files = grep {!/^\.+$/} readdir(DIR);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sort files by oldest timestamp
by Anonymous Monk on May 07, 2009 at 05:40 UTC |