in reply to Debugging Perl .cgi forms

Thanks for all the help on this, everybody. I finally found the problem. It's was this line:

$pwd = $query->param('password');

Apparently, cgi.pm will not allow you to assign a variable to an object (in this case the 'password' object) that has not been created yet. Live and learn. I don't think I'll ever make this mistake again.

Replies are listed 'Best First'.
Re: Re: Debugging Perl .cgi forms
by nysus (Parson) on Apr 01, 2001 at 07:10 UTC
    P.S.

    I solved the problem by checking to see if the password object is defined. Like this:

    else { if ($query->param('password')) { $pwd = $query->param('password'); if ($pwd eq "suckmydick") { $pwd = 1; &form; } else { &get_password(); } } else { &get_password(); } }