Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: strange usage of s///

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


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

$_="abcdef"; s/@{[s".."."gr]}/$& /; print; [download]
This variation of yours does in fact work (prints "abc def"), and so do the following ones (which are closer to the original solution by "tails")

Not for me. It prints "...abcdef" (with perl v5.14.4).

Thus I conclude that the original "solution" is the result of a typo (separator '/' put in the wrong place), and cannot work.

No typo. Code is good. You can test it on: http://golf.shinh.org/p.rb?Bisection

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


Comment on Re^2: strange usage of s///
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1052174]
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 2016-02-10 21:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (354 votes), past polls