2005年2月アーカイブ
HTML::Template
- HTML側:
<TMPL_VAR NAME=HOGE>- Perl側:
use HTML::Template;
my $tmpl = new Template(filename => 'hoge.html');
# my $tmpl = new Template(scalarref => $ref_to_text);
# my $tmpl = new Template(arrayref => $ref_to_array);
$tmpl->param(HOGE => $HOGE);
print $tmpl->output;
Text::SimpleTemplate
- HTML側:
<% $HOGE %>- Perl側:
use Text::SimpleTemplate;
my $tmpl = new SimpleTemplate;
$tmpl->setq( HOGE => "hoge" );
$tmpl->load("hoge.tmpl");
print $tmpl->fill();
# $tmpl->fill(OHANDLE = \*STDOUT);





