in reply to Re: Re: can't get $& to remove value in a substitution
in thread can't get $& to remove value in a substitution

This is from the perlre manpage. I've not used it before so this is a first stab:
\Q quote (disable) pattern metacharacters till \E
my $pattern = "ABC()DEF"; my $string = "ABC()DEF"; if ($string =~ /\Q$pattern\E/) { print "match 1\n" } if ($string =~ /$pattern/) { print "match 2\n" }
You can see that putting your variable between \Q and \E in the regex disables the ( and ) metacharacters in the pattern. (I think!).