http://qs321.pair.com?node_id=525893


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 literals
Fascinating theory, but easily proven wrong:
print "\Qabc*def\E\n"; # prints abc\*def
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.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.