signal handling in perl is marginal. and flaky. i either use sigtrap; (the sigtrap pragma,) or if that fails, roll my own. in that case, i always set my handlers recursively, like so:
sub hdl_ALRM
{
$SIG{ALRM} = \&hdl_ALRM;
# do stuff here...
}
$SIG{ALRM} = \&hdl_ALRM;