in reply to list of list and HTML::Template

Couldn't you include templates recursivly?
Children.tmpl: ... <TMPL_IF Children> <TMPL_LOOP Children> <TMPL_INCLUDE Children.tmpl> </TMPL_LOOP # end looping on the children> </TMPL_IF # closing the optional children>
Just make sure to adjust max_includes to a level higher than the max number of generations you might encounter.

-- zigdon