I don't understand the "heredocs" (some module/command I don't know or an idiom I'm unaware of as I'm not American?) but I'll tell you what I do.
I usually do all the processing in the cgi-script and then use HTMLTP (slightly modified to fit my needs) in order to send all the variables I need (and have generated) from the script to a template web page.
That web page usually consists of three or four distinct pages. One or two with the header and LOTS of layout information, the body page that handles the bare presentation of the info and the footer.
The header(s) and the footer are simple pages that get included in the "body" page, and as such I completely seperate my coding from my layout.
I find that way of working EXTREMELY time saving, plus it gives me the opportunity to handle my pages to a web-designer / graphic-artist and not have him mess with my actual info at all :-)
HTMLTP is a Templating module, and i definitely know that there must be a couple more doing the same thing (more or less) out there.
Hope I helped a little bit
Michalis

In reply to Re: CGI.pm for HTML output? by Michalis
in thread CGI.pm for HTML output? by jrsmith

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.