my $x = '2+2'; my $y = eval $x; # $y is the string '4' #### my $replace = '"$1 Perl"'; $text2 =~ s/$match/$replace/ee;