http://www.perlmonks.org?node_id=181618


in reply to Re: Re: Checking for empty CGI params; this isn't working
in thread Checking for empty CGI params; this isn't working

elsif ( (length(param('tele')) > 0) || (length(param('mobile')) > 0) ) { .. }
you've simply missed a brace each after 'tele' and 'mobile' :-)

Have a nice day
All decision is left to your taste

Replies are listed 'Best First'.
Re: Re: Re: Re: Checking for empty CGI params; this isn't working
by andrew (Acolyte) on Jul 14, 2002 at 18:16 UTC
    this is what happens, when I dont enter anything in both I pass, but if I do enter something I get the error, how is it backwords

      So you might want to post a bigger chunk of code and tell us what lines 61 or 76 are?

      Have a nice day
      All decision is left to your taste

      Just to be an ass, if you are getting exactly the opposite results than what you are expecting, negate the expression with an !. For the real solution, I would suggest printing out the values of your variables along with their associated lengths. Also, is there a trailing new-line character. There is something to be said for DIY...

      thor