$lhs = '(.)oo'; $rhs = '\1ar'; s/$lhs/$rhs/; # I want to turn foo into far [download]
In reply to How can I combine backreferences and regex interpolation? by Anonymous Monk