$1 and $2 are both defined when the match occurs.
That can't be as there is only one set of capturing parens. The second set of parens are a non-capturing lookahead.
This would probably do what you are trying to achieve:
s/(?<=\d),(?=\d)/|/g;
In reply to Re: regex match triggers "Use of unititialized value ..." warning
by BrowserUk
in thread regex match triggers "Use of unititialized value ..." warning
by mikeraz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |