Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: strange usage of s///

by brx (Pilgrim)
on Sep 03, 2013 at 20:35 UTC ( #1052177=note: print w/ replies, xml ) Need Help??


in reply to Re^2: strange usage of s///
in thread strange usage of s/// [solved: Perl 5.14 and 5.16 bug]

#!perl -pl s/@{[s".."."gr]}\K$"//

I understand the regex like this:

s/....\K // (with the good number of '.')

...but in facts it works like this:

s/....\K/ /

I don't understand why. The usage of $" seems magic too...

English is not my mother tongue.
Les tongues de ma mère sont "made in France".


Comment on Re^3: strange usage of s///
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2014-10-22 03:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (112 votes), past polls