use POSIX qw(pause); $SIG(ALRM) = ... ... alarm $seconds; ... pause; #wait for a signal without #using CPU time