in reply to Re^2: Timeout alarm for regex
in thread Timeout alarm for regex
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Timeout alarm for regex
by Ieronim (Friar) on Jul 27, 2006 at 17:56 UTC |