in reply to How to escape metacharacters without backslash it in regex?
index($str, $substr) >= 0 [download]
$str =~ /\Q$substr\E/ [download]
my $re = quotemeta($substr); $str =~ /$re/ [download]