This issue has been discussed several times on Perl Monks. Try typing templating into the search box at the top of each page, and find out how to use Super Search. You might find CGI.pm for HTML output? useful. Templating works well when used as part of a model view controller architecture. Also, you might like to consider technologies like XSLT which is discussed in XSLT vs Templating?.