in reply to How to disable Pattern Matching ?

Look at quotemeta, and its twin brother, \Q, in perlre. Like Grandfather said,
$text =~ /\Q$search/
is indeed one way to use it properly.

Another, more primitive way to achieve the same effect is to precede every \W character with a backslash. That is actually exactly what quotemeta does.

$search =~ s/(\W)/\\$1/g; # same as: $search = quotemeta($search); $text =~ /$search/ # no "\Q" tis time!