in reply to Output

You may want to look at using HTML::ElementTable for this. It will allow you to set up the entire table up ahead of time, then push the content into the table, change attributes of rows, cells, etc, then display the table.