Oh, and I just assumed that "last file" meant something like "file with the latest creation timestamp".Well, I would think that "last file" means "file last created". Now many file system do not have a creation timestamp, and for the filesystems that do, Perl doesn't have a dedicated way to access them.
To get the oldest file, use -M instead of -s.-M has nothing to do with 'oldness' of a file. It has everything to do with last modification time. Which isn't the same as age of a file. As such, -M cannot be used to determine a directory's "oldest file".
In reply to Re^6: File creation and last modifiication time
by JavaFan
in thread File creation and last modifiication time
by mecrazycoder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |