in reply to How can I combine backreferences and regex interpolation?

this should work:
$_ = 'foo'; $lhs = '(.)oo'; $rhs = '$1."ar"'; s/$lhs/$rhs/ee;
or this:
$_ = 'foo'; $lhs = '(.)oo'; $rhs = '${1}ar'; s/$lhs/qq{qq{$rhs}}/ee;
p.s. '\1' is the proper way to do a backreference (which is part of the left-hand side), but it is not the right way to refer to a capture variable in the right-hand side. for that (and anywhere else outside the regular expression part of an s/// or m// expression), you're supposed to use '$1'.