in reply to calculting time

If calculating the elapsed time to the nearest second is accurate enough for you, then a simple solution is to put this line at the end of your script:

print "Script executed in ", time - $^T, " seconds";

Hope this helps.

Cheers!

Replies are listed 'Best First'.
Re: Re: calculting time
by Anonymous Monk on Feb 06, 2004 at 00:21 UTC
    what if you want to do minute ,, do you change the - option . I just can't find the a man for time. thanks
      No, that is a minus sign, not an option. I'm subtracting the time the script started from the current time (in seconds). If you want minutes instead, you could simply divide that by sixty. Check time for the doco.

      Cheers!