Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Oneliner with substring trimming and padding

by Neighbour (Friar)
on Jul 17, 2012 at 12:17 UTC ( #982218=note: print w/ replies, xml ) Need Help??


in reply to Re: Oneliner with substring trimming and padding
in thread Oneliner with substring trimming and padding

Ahh, /e makes all the difference...sneaky little bugger isn't explicitly documented in Modifiers, but is mentioned in Regexp Quote Like Operators (which I didn't look at until now).
Thanks a lot :)


Comment on Re^2: Oneliner with substring trimming and padding
Download Code
Re^3: Oneliner with substring trimming and padding
by tobyink (Abbot) on Jul 17, 2012 at 18:59 UTC

    It's not documented in perlre because perlre is ridiculously pedantic. The /e doesn't modify the regular expression; it modifies the replacement text.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://982218]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2015-07-06 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (77 votes), past polls