develooper Front page | perl.perl5.porters | Postings from November 2008

Re: Perl 5.8.x - bug with nested RE

Thread Previous | Thread Next
From:
Eric Brine
Date:
November 30, 2008 13:58
Subject:
Re: Perl 5.8.x - bug with nested RE
Message ID:
f86994700811301358p74505b17r2654314744206aff@mail.gmail.com
On Sat, Nov 29, 2008 at 3:29 PM, Rafael Garcia-Suarez <
rgarciasuarez@gmail.com> wrote:

> IIRC, the regexp engine in 5.8.x is not reentrant -- you can't use a
> regular expression inside another one. That was fixed in 5.10 as part
> as a rewrite work on the regexp internals.
>

Isn't the problem here that 5.8 suffered from very a sticky /m? Under 5.8,
the OP's code is equivalent to

$rules =~ s{^RULES\n(.*?)^ENDRULES}{
            my $c = $1;
           #$c =~ s/\n$/ARGH/;   # Original
             $c =~ s/\n$/ARGH/m;  # Equivalent
            print ">>$c<<\n\n";
          }gems;

It was fixed in the patch that removed $*.
- Eric


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About