develooper Front page | perl.perl5.porters | Postings from February 2012

Re: [perl #109798] '/e' regexp modifier is not recognized by re pragma

Thread Previous | Thread Next
From:
demerphq
Date:
February 5, 2012 09:38
Subject:
Re: [perl #109798] '/e' regexp modifier is not recognized by re pragma
Message ID:
CANgJU+We57joR-jNGdAGhUfnv76yD2ESnULrFb2oW3XFwt9ogA@mail.gmail.com
On 5 February 2012 05:48, Eric Brine <ikegami@adaelis.com> wrote:
> On Sat, Feb 4, 2012 at 8:24 PM, Tom Christiansen <tchrist@perl.com> wrote:
>>
>> "Eric Brine via RT" <perlbug-followup@perl.org> wrote
>>   on Sat, 04 Feb 2012 16:19:41 PST:
>>
>> > Also note that "e" is not mentioned in perlre. The regex flags
>> > are (as listed in perlre): m, s, i, x, p, g, c, a, d, l, u.
>>
>> That's incorrect, and potentially misleading.
>>
>> With blank lines removed for brevity, these are
>> the only pattern modifiers:
>
>
> You removed "g" and "c", but they are accepted in patterns.
>
>>perl -wcE"qr/(?c:foo)/;"
> Useless (?c) - use /gc modifier in regex; marked by <-- HERE in m/(?c <--
> HERE :foo)/ at -e line 1.
> -e syntax OK
>
>>perl -wcE"qr/(?g:foo)/;"
> Useless (?g) - use /g modifier in regex; marked by <-- HERE in m/(?g <--
> HERE :foo)/ at -e line 1.
> -e syntax OK

Personally I consider "ignored and produce warnings" to be quite
different from "accepted in patterns".

Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

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