in reply to Metacharacters in a variable as literals in regex

There is also quotemeta. Which does the same thing as \Q ... \E but outside the m//.
$quotedregex = quotemeta $unquotedregex; m/$quotedregex/;

--

flounder