in reply to Interpolating variables from a file
You can try the fairly powerful and fairly safe: s/([@$]\w[\w\[\]{}']+)/'"'.$1.'"'/gee;