in perldoc HTML::Template steht:
Quote TMPL_LOOP
<TMPL_LOOP NAME="LOOP_NAME"> ... </TMPL_LOOP>
The <TMPL_LOOP> tag is a bit more complicated than <TMPL_VAR>. The
<TMPL_LOOP> tag allows you to delimit a section of text and give it a
name. Inside this named loop you place <TMPL_VAR>s. Now you pass to
param() a list (an array ref) of parameter assignments (hash refs) for
this loop. The loop iterates over the list and produces output from the
text block for each pass. Unset parameters are skipped. Here's an
example:
In the template:
<TMPL_LOOP NAME=EMPLOYEE_INFO>
Name: <TMPL_VAR NAME=NAME> <br>
Job: <TMPL_VAR NAME=JOB> <p>
</TMPL_LOOP>
In the script:
$template->param(EMPLOYEE_INFO => [
{ name => 'Sam', job => 'programmer'
},
{ name => 'Steve', job => 'soda jerk'
},
]
);
print $template->output();
...