local $SIG{ALRM}=sub { return; #IE, when ALRM strikes # cut short execution of the routine and just return from #there }; alarm 10;# $sth->stuff(); alarm 0;# if I'm here, I can safely continue