in reply to Setting variables inside a hash: newbie question
Where $_ contains the template string and %values contain your key-value substitution pairs. Then anything that looks like $foo gets replaced with the value corresponding to that key in %values. Of course this is just a rudimentaty templating "engine" and probably has a few flaws, so you probably want to use a prebuilt module, such as Text::Template or HTML::Templates/\$(\w+)/$values{$1}/g
|
|---|