"Chas Owens" schreef:
> Joseph L. Casale:

>> I want to script an "if" based on two conditions, var1=0 and var2=1.
>> Is there some quicker way to write this in one "if" statement like:
>>
>> If ($var1=0 ?and? var2=1) {
>>                 Do my stuff
>> }
>>
>> I know I can nest a second if, but just hoped I could do it quicker
>> :)
>
> um, how about
>
> if ($var1 == 0 and $var2) {
>     #do stuff
> }

That will "do stuff" for most values where $var2 <> 0, for example if
$var2 == 2.

-- 
Affijn, Ruud

"Gewoon is een tijger."


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to