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:
Tom Christiansen
Date:
February 5, 2012 02:57
Subject:
Re: [perl #109798] '/e' regexp modifier is not recognized by re pragma
Message ID:
21853.1328439417@chthon

Eric Brine <ikegami@adaelis.com> wrote
   on Sat, 04 Feb 2012 23:54:37 EST: 

> 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

>I don't know why that is.

I removed them because they are non-sensical, and I consider it a bug
that they are accepted but whined about as pattern operators.

>If anything is misleading is that they are listed as pattern modifiers
>(which are listed in perlre) instead of operator modifiers (which are
>listed in perlop).

Something else that's misleading is having to look in two different
places for those things.  

--tom

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