Not knocking anyone here but...you did know you can use templates with perl scripts too didn't you? I'll give the exact syntax if anyone needs it, but basically you run the cgi-script, and when it needs to output html it looks in a template file as to how to lay it out. For example, in the html template it'd have the basics like, the title, meta tags, etc. Then it'd have something like

{{begin header}}

When the cgi-script runs it basically will output the html file there. when it is told to output some information in place of {{begin header}} it well, does (sorry don't know how to explain it better). So basically you can design your template any way you want, and just move the {{cgi stuff}} parts around.