you didn't put it in a container, so your pipes aren't doing what you expect...
That'll work better.if ($line =~ /^\W*(?:$not_method)/) {
Update a \b at the end would also help make sure you don't match a string starting with as or if etc...
if ($line =~ /^\W*(?:$not_method)\b/) {
In reply to Re^3: regex subst not DWIM
by suaveant
in thread regex subst not DWIM
by girarde
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |