in reply to What do \Q and \E mean?
In general \Q...\E is used in double-quote context (such as one gets inside m// and the first leg of s///) to quote characters (such as * and +) that would otherwise have special meaning in a regular expression. E.g.:
The first regexp matches the string of a's, whereas the second one matches the substring 'a+'.'aaaa+' =~ /(a+)/; print "$1\n"; 'aaaa+' =~ /(\Qa+\E)/; print "$1\n"; __END__ aaaa a+
the lowliest monk
|
|---|