Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Finding Last minute file in a directory

by ssandv (Hermit)
on Aug 16, 2009 at 16:20 UTC ( [id://789030]=note: print w/replies, xml ) Need Help??


in reply to Finding Last minute file in a directory

First of all, you make 5 calls to localtime which has the potential to go very wrong (for instance, imagine if it's New Year's Eve and the first 3 calls happen before the clock strikes midnight and the last two happen after it).

Basically, you're doing the conversion backwards. You want to convert all your times to single integers (using something like Time::Local) and then calculate whether they are close enough together.

If you get stuck trying to do that, let us know how far you got and we can go from there.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2024-03-28 10:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found