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")$_="abcdef"; s/@{[s".."."gr]}/$& /; print; [download]
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
In reply to Re^2: strange usage of s///
by brx
in thread strange usage of s/// [solved: Perl 5.14 and 5.16 bug]
by brx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |