in reply to regexp trouble...

I ended up doing this:
$Data =~ s/([^\\])\$(\w+)/$1${$2}/g; $Data =~ s/\\\$(\w+)/\$$1/g;