$test =~ s/\$(\w+}\b/$$1/g;