in reply to How to escape out *?+ in strings for substit.

Use either the quotemeta() function, or the \Q...\E escape sequences.
$string =~ /\Q$text\E/; # or $safe = quotemeta $text; $string =~ /$safe/;