Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: How do I determine if a file was modified today?

by clintp (Curate)
on Jun 02, 2001 at 17:30 UTC ( #85192=note: print w/replies, xml ) Need Help??


in reply to Re: How do I determine if a file was modified today?
in thread How do I determine if a file was modified today?

Nice and concice. If the poster meant "in the last 24 hours" to mean this calendar day, let's combine this concise answer with some of the others above:
if ( 1 > -M $file and (localtime((stat _)[9]))[3] == (localtime)[3] ) { # modified "in the last 24 hours" }
Beware of small, subtle bugs around Daylight Savings time.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://85192]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2017-12-16 09:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (449 votes). Check out past polls.

    Notices?