in reply to Digging interpolation deeper
For example:
template.txt
This is the time: <!-- TMPL_VAR NAME="TIME" -->
Source:
And, in case you didn't realize, it doesn't actually require the source to be HTML as it removes it's own "TMPL_VAR" tags from the template when displaying.use HTML::Template; my $tmpl=HTML::Template->new(filename => 'template.txt'); $tmpl->param( TIME => scalar localtime(time) ); print $tmpl->output;
|
|---|