in reply to
match with symbol
Or Corion points out, one way is to use
\Q
and
\E
. Another is to realize that if you want an exact match, there's no need to use the regexp engine.
if (index($var, $var1) >= 0) { print "Yes"; }
[download]
Comment on
Re: match with symbol
Select
or
Download
Code
In Section
Seekers of Perl Wisdom