more useful options | |
PerlMonks |
Re^3: Find the textby mzedeler (Pilgrim) |
on Jul 30, 2009 at 10:16 UTC ( [id://784559]=note: print w/replies, xml ) | Need Help?? |
It looks like you are trying to iterate over all whole minutes in a 30 minutes interval. That solution is very ineffective. If you have two dates, one from your file and one from the system time, just ensure that they are unix time (seconds since 1/1/1970 00:00) and then subtract one from the other and then see if the result is between 0 and 1800. This is the criteria that decides if a given FIND line is taking place within the next half hour. System time is already in unix time, so all you need is converting the time stamps from the file to seconds since epoch. There are plenty of modules that can do it for you. Also, please do this:
In Section
Seekers of Perl Wisdom
|
|