in reply to Regex Grumblings (Variable Interpolation)

Consider this snippet:
$bar = 'snafu'; $foo = '$bar'; $_ = '$bar snafu'; s/$foo/XYZ/; print;
I think that you are expecting one of two results from this code, but I'm not sure which...

Neither of those would be correct behavior.

The correct output is $bar snafu, because the substitution doesn't find a match for m'$bar'