Hopefully a simple question.  Not sure if the subject line gets across
what I'm trying to do.  I'm trying to match one string with another,
using a regex, like so:

my $string = "abc";
my $match = "ab(c";

if($string =~ m/$match/){ print "MATCH!\n"; }

This gives me an error because it's treating the paren as a regex
grouping character, which (in this case) is not what I want.  I want
it to match paren.

This leads me to consider the many other characters that would need
escaping.  What's the right way to do this without escaping every
non-alpha character?
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to