in reply to variable with $$

Try...

my $newvar = "\$" . "$name";