in reply to PERL Countdown Timer

Here you go. I included some error checking in case someone mixed letters in with the number, or left out the numerical part entirely:
use strict; use warnings; print "How long should I sleep, in hours? "; my $wait = <STDIN>; ($wait) = $wait =~ /(\d+)/; $wait -= 0; my $end = time() + $wait * 3600; sleep 1 while time() < $end; print "FINISHED";