in reply to Re: Re: need helping sorting
in thread need helping sorting
The number at the end is the modify date in Unix epoch format. You may want to translate it to a more readable format, but I can't remember how to do that right now (WAY too much Java this week).opendir(FILES, $SAVE_DIRECTORY); @allfiles = sort { (stat "$SAVE_DIRECTORY/$a")[9] <=> (stat "$SAVE_DIR +ECTORY/$b")[9] } (grep(!/^\.\.?$/,readdir(FILES))); closedir(FILES); foreach $file (@allfiles) { print "$file " . (stat "$SAVE_DIRECTORY/$file")[9] . "\n"; } exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: need helping sorting
by bbfu (Curate) on Mar 15, 2001 at 03:57 UTC |