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

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

Thread Previous | Thread Next
From:
Eric Brine via RT
Date:
February 4, 2012 16:19
Subject:
[perl #109798] '/e' regexp modifier is not recognized by re pragma
Message ID:
rt-3.6.HEAD-14510-1328401181-517.109798-15-0@perl.org
On Sat Feb 04 16:15:49 2012, ikegami@adaelis.com wrote:
> On Sat Feb 04 04:05:02 2012, glitchmr@myopera.com wrote:
> > When '/e' modifier is used with 're' module, Perl complains about 
> > unknown modifier. Personally, I think that informing about '/e'
> > not being able to be used by 're' module would be more useful.
> > 
> >     C:\Users\Konrad>perl -e "use re '/e'"
> >     Unknown regular expression flag "e" at -e line 1
> 
> That message is accurate.
> 
> >perl -e" /(?e:x)/ "
> Sequence (?e...) not recognized in regex; marked by <-- HERE in m/(?e
> <-- HERE :x)/ at -e line 1.
> 
> "e" is not a regular expression flag. It is a substitution operator flag.

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.

(I find this very odd that p, g and c are regex flags instead of match
substitute operator flags, but they are are.)


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=109798

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