- or download this
... $findit .= "/\Q$term\E/i $param ";
- or download this
$findit_re = "\\b(?i:\Q$term\E)\\b";
- or download this
$findit_re = qr/\b(?i:\Q$term\E)\b/;
- or download this
my $target = "[a]";
if ($string =~ m/$target/) { ... }
- or download this
my $target = "[a]";
if ($string =~ m/\Q$target\E/) { ... }
# or:
my $re = quotemeta($target);
if ($string =~ m/$re/) { ... }