Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: How do you write a perl script to calculate the age of a file

by VSarkiss (Monsignor)
on Jun 19, 2001 at 07:32 UTC ( [id://89539]=note: print w/replies, xml ) Need Help??


in reply to Re: How do you write a perl script to calculate the age of a file
in thread How do you write a perl script to calculate the age of a file

Ah, when will the golf urge pass? You could do: unlink $filename if -M $filename > 2; saving yourself two parentheses and two squiggly braces. ;-)

It even reads exactly as the questioner proposed: "delete the file if it is more than two days old".

  • Comment on Re: Re: How do you write a perl script to calculate the age of a file
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-16 10:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found