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

if you don't mind the original value being changed: my $foo = "foo"; $foo =~ s/(.)oo/$1ar/;
  • Comment on Re: How can I combine backreferences and regex interpolation?