Well, if the only difference is using the OO style over the functional style, then i say use the functional style. Hands Down. The only time i use the OO style is when i absolutely must ... but until those moments, i use the functional style because it looks cleaner and requires less typing.

I think neuroball was being a bit subjective by claiming that is how CGI.pm was intended to be used. Especially upon viewing this snippet of unchanged code:

print "<center><b>Email already exists in database.</b></center>\n";
which i would have changed to:
print p({align=>'center'}, b('Email already exists in database'));
As long as you use param(), header(), and upload(), (correctly) you are using CGI.pm correctly, in my humble opinion. CGI.pm surely subscribes to Perl's philosophy of There Is More Than One Way To Do It!

I think the outline that Roger provided you with is an excellent place to start studying. You should always write out some kind of design of the possible scenarios ... be it pseudo-code or geometrical shapes with arrows ... before you just start hacking out some code. How can you solve the problem if you don't even understand what the problem is?

But, do heed Ovid and Podmaster's suggestion to use the CPAN! The idea is that someone has already solved this problem for you, the catch is that you still have to understand what the problem is. That and having a inkling of howto RTFM. ;)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

In reply to 3Re: Form param checking by jeffa
in thread Form param checking by Anonymous Monk

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.