Also to get rid of pesky characters like + in re's you could make a character class.
Another way to do it.
use strict; my $var1 = "a+b"; my $var2 = "a[+]b"; if ($var1 =~ /$var2/) { print "hey it matches \n"; } print "hey here \n";
In reply to Re: matching the + character
by dga
in thread matching the + character
by jalebie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |