CGI.pm is a very usefull tool, it's great for form data parsing, making dropdown menus, writing cookies, and so on. But, personally I don't like using it for formatting all html output, to me it just complicates things. And If a non-programmer has to get in and change something, they are out of luck. I see absolutley nothing wrong with printing out straight html.

However, as many have mentioned above, Templating is a very nice option. I have started using templates for many reasons. One, the designers don't have to touch my code at all, they just make a pretty little html file and I run that through my program. Two, you can open html templates in GUI editors. While I still do most of my editing in TextPad, sometimes it's just faster and more efficient to do things in dreamweaver. Three, the code just looks better and is easier to manage when you don't have hundreds of lines of HTML to sift through. There are of course more advantages than that, but that was enough to change my mind.

-thabenksta
my $name = 'Ben Kittrell'; $name=~s/^(.+)\s(.).+$/\L$1$2/g; my $nick = 'tha' . $name . 'sta';

In reply to Re: Why use HTML instead of CGI? (codediscussion) by thabenksta
in thread Why use HTML instead of CGI? (code, discussion) by deprecated

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.