in reply to how can I put together my html code and perl script?

There are several different alternatives, and the correct answer depends on your needs and capabilities. Off the top of my head I can think of:

  1. HTML::Mason -- for a full Perl-based solution I'd have trouble believing there's a better system out there. Mason requires mod_perl and a good ten to fifteen modules to run correctly, but is well worth the effort. Aside from the more traditional ASP-style embedded Perl (using <% an_expression %>), the Mason development team has recently added object-like features and autohandlers that enable you to thoroughly seperate formatting from content and make the system more JSP-like (not a big deal if you only have to maintain five to twenty pages, but a life saver if you have to maintain five or fifty times that amount). I'm a huge fan of this system and you can see what I've been up to here. For reference, here's the home page code, the entire page, and you can check it against the source in the browser to see what kind of advantages we're talking about in terms of maintainability and ease of updating (e.g. allowing someone else to do without worrying that they'll break everything):
    <table border="0" cellpadding="3" cellspacing="4"> <tr> <td colspan="2"><h2><font color="FF9933">Latest Company News</ +font></h2></td> </tr> <& /utils/press/last_releases, last=>2, get=>'press' &> </table> <br> <p>Cyber Dialogue is the leading Analytical eCRM provider.<snip></p> <p>Cyber Dialogue's fully hosted solution<snip></p> <%attr> type => 'index' windowTitle => 'Cyber Dialogue <snip>' pageTitle => '' description => 'Cyber Dialogue <snip>' keywords => 'Cyber Dialogue Inc.<snip>' </%attr>
  2. HTML--Embperl is here and although I haven't played with it at all (read: I am talking out of my a**) I believe that it offers a feature-set similar to what you'd find with an ASP system (e.g. <% embedded_code %>)
  3. Straight CGI or FastCGI -- just use in place of your .html files and dynamically serve whatever you want

And that's just off the top of my head... You might also consider PHP -- I don't think it's as powerful as Perl (especially not for larger scale projects) but it seems to be more readily available if you don't control the box your site's being served on. They copied a lot of their ideas from Perl so it's very easy to pick up after a few quality hours with the manual.

Replies are listed 'Best First'.
Re: How can I put together my html code and perl script?..HTML::Template
by Anonymous Monk on Nov 28, 2000 at 06:09 UTC
    There is a module I found out about in the O'Reilly CGI Programming book called HTML::Template. It is maintained by the author and there is a mailing list about it. It's on CPAN.

    The goal of it is simplicity and COMPLETE separation of code and HTML.

    Seems pretty cool to me, although not targeted for bigger projects like Mason is.