in reply to Interpolating $var in a $string

Use a real templating system. Look at HTML::Template or Template Toolkit. Those are the most commonly used.

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

I shouldn't have to say this, but any code, unless otherwise stated, is untested

Replies are listed 'Best First'.
Re: Re: Interpolating $var in a $string
by freddo411 (Chaplain) on May 27, 2004 at 21:20 UTC
    This is, of course, the clean, proper, readable and maintainable way to do it. I was looking for a quick and dirty hack.

    Cheers

    -------------------------------------
    Nothing is too wonderful to be true
    -- Michael Faraday