http://www.perlmonks.org?node_id=64364


in reply to How to prevent metacharacter interpolation

Use either the quotemeta function:
$pattern = quotemeta( $pattern ); m/$pattern/;
or use the \Q and \E escape characters:
m/\Q$pattern\E/;
They do exactly the same thing; just one is a function and the other works inside regex patterns.