in reply to Re: strange usage of s///
in thread strange usage of s/// [solved: Perl 5.14 and 5.16 bug]
perl -MO=Deparse -e '$_="abcdef"; s/@{[s".."."gr]}\K$"//; print' $_ = 'abcdef'; s[@{[s/.././gr];}\K$"][]; print $_; -e syntax OK
perl -MO=Deparse -e '$_="abcdef"; s/@{[s".."."gr]}\K //; print' $_ = 'abcdef'; s[@{[s/.././gr];}\K ][]; print $_; -e syntax OK
PS: With Perl v5.14.2 I get the same result as you.
(Testing environment was 64bit Linux in both cases.)
So yeah, strange indeed...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: strange usage of s///
by brx (Pilgrim) on Sep 04, 2013 at 17:33 UTC |