in reply to Variable Interpolation
That won't work if $need_to_interpolate includes a '"'. Fix:
my $string = "cheese"; my $need_to_interpolate = 'smell my "$string"\n'; $need_to_interpolate =~ s/"/\\"/g; print eval(qq{"$need_to_interpolate"}); [download]