Works fine here:
$ perl $SIG{'ALRM'} = sub { die "alrm received"; }; alarm 2; my $re = ('a*' x80).'(b|c)'; my $str = "a" x 80; $str =~ /$re/; __END__ ... runs forever ... $ PERL_SIGNALS=unsafe perl $SIG{'ALRM'} = sub { die "alrm received"; }; alarm 2; my $re = ('a*' x80).'(b|c)'; my $str = "a" x 80; $str =~ /$re/; __END__ alrm received at - line 1.
--
David Serrano
In reply to Re^3: Timeout alarm for regex
by Hue-Bond
in thread Timeout alarm for regex
by Otogi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |