If did something like this:$var1 = "This (is)- my first string"; $var2 = "This (is)- my first string";
Surprisingly, above test is always producing "Did not match". Am I missing anything in the comparison? Thanks.if ($var1 =~ /$var2/) { print "Matched"; } else { print "Did not match"; }
In reply to RegEx Comparison by perl@1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |