Hi
What do you mean by "write to templates"?
What do you mean by a "loop for a template"?
Some hints below
#!/usr/bin/perl -- use strict; use warnings; use HTML::Template; my $tmpl = q{ <TMPL_LOOP NAME=LOOP> Name: <TMPL_VAR NAME=NAME> Nicknames:<TMPL_LOOP NAME=nicknames> -: <TMPL_VAR NAME=NAME></TMPL_LOOP> </TMPL_LOOP>}; my $data = { LOOP => [ { name => 'Bobby', nicknames => [{name => 'the big bad wolf'}, {name => 'He-M +an'}], }, ], }; for(1..2){ my $template = HTML::Template->new( scalarref => \$tmpl, ); $template->param( %$data ); $template->output(print_to => *STDOUT); } __END__ Name: Bobby Nicknames: -: the big bad wolf -: He-Man Name: Bobby Nicknames: -: the big bad wolf -: He-Man
In reply to Re: HTML::TEMPLATE Simutaneous Templates
by Anonymous Monk
in thread HTML::TEMPLATE Simutaneous Templates
by StrangeDucks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |