Perl-Sensitive Sunglasses | |
PerlMonks |
Re^5: list files based on age and patternby hdb (Monsignor) |
on Sep 16, 2013 at 14:28 UTC ( [id://1054302]=note: print w/replies, xml ) | Need Help?? |
My fault. You need to add the path to the filename when testing with -M like this my @files = grep {!/\_NSA|d+_\d+\.xml/ && (-M "$path/$_") > $min_age} readdir DIR;I only tested in the current directory where it does not make any difference.
In Section
Seekers of Perl Wisdom
|
|