Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^5: list files based on age and pattern

by hdb (Prior)
on Sep 16, 2013 at 14:28 UTC ( #1054302=note: print w/ replies, xml ) Need Help??


in reply to Re^4: list files based on age and pattern
in thread list files based on age and pattern

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.


Comment on Re^5: list files based on age and pattern
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054302]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2014-11-01 12:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    If a safe, affordable anti-ageing treatment that extended life indefinitely were to become available, would you take it?



    Results (3 votes), past polls