http://www.perlmonks.org?node_id=569236


in reply to Programmatically generating HTML tables including <thead> and <tbody>

This is one of the many reasons I like to use templates, rather than HTML-generating code routines. The output never quite matches what I want or expect. I'd recommend HTML::Template, but I know a lot of people are partial to Template Toolkit too.