in reply to Current time as variable?

Time::Local is probably what you want (presuming you don't need subsecond accuracy). This should print "10" because it sleeps for 10 seconds.
use Time::Local; my @now = localtime(); my $epoch_time1 = timelocal(@now); sleep 10; @now = localtime(); $epoch_time2 = timelocal(@now); print $epoch_time2 - $epoch_time1;
Update: perldoc -f time :-). My example is just something to play with to show the differences between the available time representations.