my $replace = '"$1 Perl"'; $text2 =~ s/$match/$replace/ee;