I'm trying to do a nested loop in HTML::Template. My webapp grabs a list of directories and a bunch of files from those directories. I wish to display a table which includes the directory name followed by rows of 5 filenames (each one in a column).
My current template is as follows:
<th colspan="5" bgcolor="#E0E0E0"><font size="+3"><TMPL_VA
<td colspan="5"><TMPL_VAR NAME="filename"></td>
It starts with the dir_loop -- for each dir. The outter_file_loop is for each row, and the inner_file_loop is for each item in the row.
My questions are as follows:
Does the template look like it would work? If so, how would I construct the array & hashes to make it work? Is there a better way to do it (<- this should probably be asked first)?
Thanks in advance.