$bar = 'snafu'; $foo = '$bar'; $_ = '$bar snafu'; s/$foo/XYZ/; print;