sub GetINDirFiles { my ($path) = @_; my $min_age = 1 / 96; opendir DIR, $path or die $!; # my @files = readdir DIR; # my @files = grep {!/\_NSA|_\d+_\d+\.xml/} readdir DIR; closedir DIR; my @files = grep {!/\_NSA|d+_\d+\.xml/ && (-M) > $min_age} readdir DIR +; return(@files); }
in the source path i added two more file and executed the code but i see @files has no file in it whereas i would expect all the files other then newly added files.
-KAKA-In reply to Re^2: list files based on age and pattern
by kaka_2
in thread list files based on age and pattern
by kaka_2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |