Put the quantifier inside the parentheses instead of outside the parentheses:
$line =~ s/-=(A)([][]?)(B)([][]?)/<b>$1$2$3<\/b>$4/g;
In reply to Re: undefined backreferences
by jwkrahn
in thread undefined backreferences
by frasco
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |