in reply to expanding quoted referenced data

The usual method doesn't work --
====usual variable substitution idiom for comparison==== my $lamb = 'wolf'; my $text = 'Mary had a little $lamb.'; $text =~ s/(\$\w+) /$1/eeg; print $text; # ^------------- ?
Doesn't work because of the extra blank after your capturing parens.
$text =~ s/(\$\w+)/$1/eeg; print $text; __END__ Mary had a little wolf.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}