Ugh, I meant to say that this returns false instead of true: perl -e 'print “foo" =~ /[\Qa-z\E]/ ? "true" : "false”' > On Oct 15, 2014, at 1:16 AM, Eric Brine <ikegami@adaelis.com> wrote: > > On Wed, Oct 15, 2014 at 12:30 AM, Marco Moreno <mmoreno@pobox.com <mailto:mmoreno@pobox.com>> wrote: > Using a \Q inside a bracketed character class, should this return true or false? This returns "false" for my 5.18.2 and 5.20.0 installs. > > perl -e 'print "foo"=~ /\Q[a-z]\E/ ? "true" : "false"' > > It's not inside a bracketed class, not that it matters. \Q..\E doesn't know anything about regular expressions. It escapes non-word characters after interpolating, so > > /\Q[a-z]\E/ > > is the same thing as > > /\[a\-z\]/ >Thread Previous | Thread Next