Although, unless you're going to use $1 and/or $2 later, there's no reason to have them at all.$str =~ s/(\d*)%var%(.*)/$1REPLACED$2/;
$str =~ s/%var%/REPLACED/;
In reply to Re^3: Regex triggering uninitialised values
by Eimi Metamorphoumai
in thread Regex triggering uninitialised values
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |