in reply to How can I keep track of the execution time of a script?

use Timer::Runtime

Example: duration.pl
#!/usr/bin/perl use Timer::Runtime; print "hi\n";
Outputs:
$ perl duration.pl duration.pl Started: Fri Aug 5 01:48:14 2016 hi duration.pl Finished: Fri Aug 5 01:48:14 2016, elapsed time = 00:00:0 +0.000398 $