in reply to Re^2: regex subst not DWIM
in thread regex subst not DWIM
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/) {
|
|---|