If you're doing "massive" work with CGI, it sounds like your outputting lots and lots of html. In which case
templates are your friends. Personally I prefer
this one because I feel it does the best job at seperating the data from the layout and all those other fun buzzwords we use for templating. It even has an include statement for you.