in reply to Re: How do I pass $1 to s///?
in thread How do I pass $1 to s///?

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])