in reply to need helping sorting
...of course this sorts by Last Modified date, so far as I know there isn't a way to sort by actual file creation date.opendir(FILES,"$SAVE_DIRECTORY"); @allfiles = sort { (stat $a)[9] <=> (stat $b)[9] } (grep(!/^\.\.?$/,re +addir(FILES))); closedir(FILES); foreach $file (@allfiles) { print "$file " . (stat $file)[9] . "\n"; } exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: need helping sorting
by arturo (Vicar) on Mar 15, 2001 at 02:59 UTC | |
|
Re: Re: need helping sorting
by anthracite98 (Initiate) on Mar 15, 2001 at 02:38 UTC | |
by Hot Pastrami (Monk) on Mar 15, 2001 at 02:47 UTC | |
by bbfu (Curate) on Mar 15, 2001 at 03:57 UTC |