Or, as a tiny snippet that you paste into your script:
sub interpolate {(my$ZZZ=shift)=~s/([\\"])/\\$1/g;eval qq{"$ZZZ"}}However, that one doesn't really have any way for you to escape percent-signs, at-signs, or dollar-marks that you don't want to have expanded.