in reply to interpret variable in a single quoted string

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.
  • Comment on Re: interpret variable in a single quoted string

Replies are listed 'Best First'.
Re^2: interpret variable in a single quoted string
by birkey (Initiate) on Feb 08, 2011 at 21:17 UTC
    That is it!!!
    I have used eval before but never to do this.
    Sometimes it is harder to know how to ask the question than solving the problem.


    Thank you!