in reply to How to find most recent file and use it?
The file test operators -X -M will give you the modification time, so something like
my $last = ( sort {-M $a <=> -M $b} glob('*.rtf') )[0];
Do check the docs for glob, as it doesn't take a regex but a shell-like file match expression.
|
|---|