I like using one program. I think Sifmole's idea of using CGI::Application is well suited for a script like this. Reason being is that it will help you to keep things organized. As far as the HTML goes, use HTML::Template or Template::ToolKit to fill it out and keep the HTML away from the perl side of things. For validating form input use HTML::FormValidator, it will allow you to make rules for each field very easily.

For saving the information of a multiple page form I would use MySQL if you have it avalable. If you don't, then use IPC::Shareable and keep track of the session by using a session id placed in a cookie (encrypt it if you can - see Crypt::CBC). Don't forget to timestamp the session as well as keep the session id available somewhere so that if somone bails out in the middle, you can clean it up later. For more ways to keep state I would suggest you get a hold of Writing Apache Modules with Perl and C also known as "The Eagle Book". I know you may be writing this in regular CGI but still it is a useful book for ideas on how to do things. You might also like to get a hold of Writing CGI Applications with Perl as well.

Good luck,

Brother BMaximus

update:Fixed some lousy grammatical errors and linked IPC::Shareable to CPAN

In reply to Re: generarting dynamic html using perl by BMaximus
in thread generarting dynamic html using perl by new_2_perl

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.