in reply to
Using variables in regex search
If
$str
contains characters which are special for regular expressions, use:
$text =~ m/\Q$str/;
[download]
See also
quotemeta
and
Quoting metacharacters
Comment on
Re: Using variables in regex search
Select
or
Download
Code
In Section
Seekers of Perl Wisdom