in reply to placeholders without printf?

In both snippets, what $bar contains is a template. You're looking for a template system. String::Interpolate's interface is a bit weird, but it supports templates like the one you have in your second snippet.

Replies are listed 'Best First'.
Re^2: placeholders without printf?
by Urthas (Novice) on Jan 23, 2010 at 04:17 UTC
    String::Interpolate's interface is a bit weird

    You weren't kidding. O.o

    Thanks again.