It is not that single- and double-quoted strings are different beasts, but different ways of inputting data. Once the data is in there, it's just a string. In your case, what you want to do is usually referred to as double-interpolating. You can accomplish this with eval, but only use eval on trusted data. See Double Interpolation of a String for an example, care of chromatic.