in reply to Perl alarm working intermittently

Is this my code or a Perl issue?

It's hard to tell without knowing what exactly parsePageFunction() is doing.  For example, does it by any chance itself (or via some module it's using) modify $SIG{ALRM} under some circumstances?

You might also try setting PERL_SIGNALS=unsafe.