in reply to Losing control of large regular expressions

Setting the environment variable PERL_SIGNALS to "unsafe" works, but it must be set before the script is started. What you could do is put something like this at the top of your script:
unless ($ENV {PERL_SIGNALS} && $ENV {PERL_SIGNALS} eq "unsafe") { $ENV {PERL_SIGNALS} = "unsafe"; exec $0, @ARGV; }
This will look at your environment, and if the environment variable isn't set to the value you want, it sets it, and execs itself. Now your alarm ought to work (assuming your Perl is 5.8.1 or older).

Replies are listed 'Best First'.
Re^2: Losing control of large regular expressions
by scottb (Scribe) on Jan 12, 2005 at 18:40 UTC
    Thanks for this bit of info, it was the final key, I now have it working the way I want, with timeouts. I am going to do more reading on regexes to ensure I know everything I can before I ask any regex specific questions (re: the regexes that are causing this problem).

    Thank you everyone.

    - Scott