Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How do I find and delete files based on age?

by Anonymous Monk
on Feb 26, 2007 at 19:32 UTC ( [id://602201]=note: print w/replies, xml ) Need Help??


in reply to How do I find and delete files based on age?

Look into the File::Glob module to get your file list (perldoc File::Glob).
You can use regular expressions to look for filename matches (perldoc perlre), it'll look something like:
if ($filename ~= m/DATE_/)
For the date comparison, are you going to use a system date, or is there some sort of naming convention that integrates the date into the file name? If the latter, regular expressions are your friend again.
  • Comment on Re: How do I find and delete files based on age?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-19 14:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found