in reply to SIGALRM timeout problem

Odds are that you're using Perl 5.8, and are hitting the unfortunate side-effects of safe signal handling.

Either Perl accepts signals immediately and sometimes will segfault. Or Perl only accepts them on the boundaries between opcodes and sometimes ignores them indefinitely.

With 5.8.1 and later, you should be able get back the old behaviour by setting $ENV{PERL_SIGNALS} to "unsafe". (At least if I'm reading my local copy of perlrun properly, you can.)