change && to ||

> -----Original Message-----
> From: Admin-Stress [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 26, 2002 10:31 AM
> To: Perl beginners
> Subject: checking parameters ...
> 
> 
> I wrote a simple script like this :
> 
> #!/usr/bin/perl
> 
> if (($ARGV[0] eq "") && ($ARGV[1] eq "") && ($ARGV[2] eg "")) {
>    print "You must give me 3 parameters\n";
>    exit;
> }
> 
> Then, I tested like with 1 .. OR 2 ... OR 3 parameters, it 
> did not print the text "You must...".
> 
> Why this happened? How to detect "null" parameters? is "" 
> equal to "null"?
> 
> I can use "if (scalar(@ARGV) < 3) {...}" but that not the case.
> 
> Thanks for help me to explain this.
> 
> newbie
> 
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to