in reply to Re: Help with perldebug
in thread Help with perldebug

I posted this accidentally as "Anonymous Monk"... sorry. This statement

if ($q->param('field') eq "") {&printform()} {&results()}

gives the error: Use of unitialized value in string eq at select.cgi line 18.
I'm beyond "showmethemonkey" and I know my CGI's are being processed. So what is wrong with the eq statement?

Replies are listed 'Best First'.
Re: Syntax error?
by DigitalKitty (Parson) on May 17, 2002 at 00:45 UTC
    Can you post the whole program?
    I suspect the error is in the 'field'. You need the name of the field variable there ( such as name or address ). Like this:

    #!/usr/bin/perl -wT use CGI; use CGI::Carp qw( fatalsToBrowser ); if($q->param('name') eq "") { &printForm(); &results(); }

    Did you declare the fields with 'my' in your CGI app?
    -DK