I personally use Time::Stopwatch for this. If you use Time::HiRes as well, it will be more precise. The code is clean and easy to read:
use Time::Stopwatch; tie my $timer, 'Time::Stopwatch'; #.. your code here print "Completed in $timer seconds";
Of course, you can use some simple math to break the elapsed seconds into H:M:S format if you'd like.
In reply to Re: time it took script to complete
by radiantmatrix
in thread time it took script to complete
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |