in reply to Unrecognized escape \Q passed through in regex

The \Q and \E can't be interpolated into your regexp and still function like you expect \Q and \E to. At the time the \Q" and \E are seen, they aren't special anymore and just mean Q and E.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

  • Comment on Re: Unrecognized escape \Q passed through in regex

Replies are listed 'Best First'.
Re^2: Unrecognized escape \Q passed through in regex
by Articuno (Beadle) on Jan 26, 2006 at 18:35 UTC
    But if they "just mean" Q and E, why does perl gives me an error when it (*) sees them ?

    (*) offtopic: I was about to type "he" instead of "it" :-)
    -- 6x9=42

      It's not an error, it's a warning. It's a warning because you escape things because you expect them to be special. Perl is telling you that you were wrong and that they aren't.

      ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊