Beefy Boxes and Bandwidth Generously Provided by pair Networks Ovid
Welcome to the Monastery
 
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 wandering the Monastery: (15)
As of 2014-04-18 19:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (471 votes), past polls