in reply to Capture alarm signal

Take a look at Perl::Unsafe::Signals. It might work for you.