http://qs321.pair.com?node_id=639298


in reply to Converting "static" CGI.pm code into HTML::Template loops

HTML::Template is a well documented module that has perfectly good examples that DIRECTLY apply to your question. I doubt very much that someone will want to recreate such a fine document here.