in reply to HTML::Template Loop Question

There is a section in the documentation that mentions "<TMPL_LOOP>s within <TMPL_LOOP>s are fine and work as you would expect."

This is untested but should get you going in the right direction:

in your script

$template->param( STATE_LOOP => [ { state => 'Alaska', NAME_LOOP => [ { name =>'Judy Jetson'}, { name =>'Barney Rubble' }, ], }, { state => 'TEXAS', NAME_LOOP => [ { name =>'Joe Bloe'}, { name =>'Jane Doe' }, ], }, ], );
and then in your TEMPLATE:
<ul> <TMPL_LOOP NAME="STATE_LOOP"> <li><TMPL_VAR NAME="state"> <ul> <TMPL_LOOP NAME="NAME_LOOP"> <li><TMPL_VAR NAME="name"></li> </TMPL_LOOP> </ul> </li> </TMPL_LOOP> </ul>
This will probably need some tweaking.. but should give you an idea of how to proceed.

-enlil