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 reply to Re^5: list files based on age and pattern
by hdb
in thread list files based on age and pattern
by kaka_2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |