phizymonk has asked for the wisdom of the Perl Monks concerning the following question:

I have a form made and I have a professor that is all about teaching yourself, and I need to validate certain form elements with perl/CGI. I need to make sure they enter a username a password a valid zip code and make sure certain checkboxes are marked, if there are no errors it should print the data entered. If there are errors it should tell you specifically what is wrong. I honestly have no Idea how to start with any of these things.

Replies are listed 'Best First'.
Re: CGI Form Validation
by NetWallah (Canon) on Feb 16, 2016 at 05:51 UTC
    Start with CGI Programming 101 . The concepts required to answer your questions start in "Chapter 4: Processing Forms and Sending Mail".

    May other such tutorials exist - I'm sure other monks will point you to similar places.

            "Think of how stupid the average person is, and realize half of them are stupider than that." - George Carlin

Re: CGI Form Validation
by kcott (Archbishop) on Feb 16, 2016 at 08:37 UTC

    G'day phizymonk,

    The documentation for the CGI module has examples covering most, if not all, of what you'll need for this task.

    — Ken

Re: CGI Form Validation
by Anonymous Monk on Feb 16, 2016 at 09:45 UTC
    If you want implement a web form without hand coding everything, I'd recommend HTML::FormFu, as it does everything a form should do in about 6 lines.
    It's not for the faint hearted though.