in reply to list of list and HTML::Template

You can use <TMPL_IF> to test to see if there are "children." However this doesn't help your recursive problem. In the one case I was passing recursive data, I ended up doing what has been suggested: write a function to "stringify" the data and do that and pass the result to HTML::Template. Not exactly a great solution, have you searched CPAN for any of the addons to HTML::Template? You could try writing a plugin: HTML::Template::Pluggable.