Still not quite right.
Backreferences are \1, \2, etc in the LHS (regexp part) of the substitution.
Backreferences are $1, $2, etc in the RHS (substitituion part) of the substitution.
Lastest perlre (via [doc://perlre])
In reply to Re^2: How do I pass $1 to s///?
by ikegami
in thread How do I pass $1 to s///?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |