|Pathologically Eclectic Rubbish Lister|
TIME: Adding Up and Predicting itby brusimm (Pilgrim)
|on Aug 24, 2007 at 14:13 UTC||Need Help??|
brusimm has asked for the
wisdom of the Perl Monks concerning the following question:
Once again, I turn to the wisdom of the ages for Perl.
I've written a procedure that reads (grep) a file, finds certain parameters, spits them back out to the screen, and loops in a defined amount of minutes that the user is asked for. (The file is updated constantly by another 3rd procedure)
At the bottom of the print out, (After reading `date`) I print out what time this print out is, and I would like to print out the next time the print out will occur.
IE: Here's your search term, review it every x minutes, here's the time I reviewed your file.
MY QUESTION: So besides splitting the `date` into arrays and scalars, adding the time loop to the minutes, then reconstructing the time to print it back out, is there a function (Or more economical way) in Perl that can do this?
My way will work, but I've got a lot of lines for a single line of printout that is just a courtesy to the user.
note: I haven't replicated the script here because it is in my work space, and the customer does not allow material outside of their steel box!! I'd have to retype it completely.
Any thoughts or suggestions would be appreciated.