The suggestions given thus far are good. If you decide to avoid a templating solution, however, don't forget about other options besides
HTML::Table, namely
HTML::ElementTable. If you can get used to working with tree structures,
HTML::Element style, then it's a nice way to generate dynamic HTML tables.
Matt