http://www.perlmonks.org?node_id=1052137


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

Try YAPE::Regex::Explain

PS: The s/@{[s".."."gr]}\K$"// solution does not work for me at all. Does it actually work for you?