in reply to Re: Unrecognized escape \Q passed through in regex
in thread Unrecognized escape \Q passed through in regex
\Q and \E don't work inside interpolations. They only work in regexp literalsFascinating theory, but easily proven wrong:
The truth is that \Q means "add backslashes to special chars until \E" in the exact same places that \n becomes a newline and $x expands to its value: every double-quoted string. A regex (that doesn't have special single-quote quoting) is just one example of that.print "\Qabc*def\E\n"; # prints abc\*def
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In Section
Seekers of Perl Wisdom