use strict; my $start = time(); do_stuff_that_takes_long_time(); my $end = time(); my $difference_in_seconds = $end - $start; print "The process took $difference_in_seconds second(s)\n";