## my $ht=new HTML::Template(filename=>recurse.tmpl); my $data; while($foo=recurse()) { $ht->param(one=>foo,two=>bar, recursion_data=>$data); $data=$ht->output; $ht->clear_params(); }