Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks;

I'm trying to set up a timer in my code to say, if this value stored on this variable is older than the actual time run this sql to delete everything from this db-table and do an sql insert to populate new data into the db-table.
How do I set up this timer in order for me to compare the time with the actual time and do my logic there?
Thanks for the help!
  • Comment on running a script with conditions on elapsed time

Replies are listed 'Best First'.
Re: running a script with conditions on elapsed time
by EdwardG (Vicar) on Apr 29, 2004 at 12:07 UTC

    What OS?

    What have you tried?

    Show us your code so far, I'm sure someone can point you in the right direction.

     

      Thanks, I decided to create a sub routine and call it first that is going to delete every record on the db-table and after I call this other sub that will insert all the new records in it, thanks for the inspiration anyway!!!