Re: Re: complex condition

2003-10-31 Thread Steve Gilbert
>> I know there must be a way to do the following: >> >> if (($foobar > 3) || ($foo="t" && $bar = "b")) {print >> "yup"} >if (($foobar > 3) || ($foo eq "t" && $bar eq "b")) {print "yup"} > >Your problem is that a single '=' is assignment, not >equality. '==' could also be used >instead of 'eq'.

RE: complex condition

2003-10-30 Thread LoBue, Mark
> -Original Message- > From: Steve Gilbert [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 30, 2003 9:08 AM > To: [EMAIL PROTECTED] > Subject: complex condition > > > I know there must be a way to do the following: > > if (($foobar > 3) || ($foo=

Re: complex condition

2003-10-30 Thread Andrew Gaffney
Perry, Alan wrote: Andrew Gaffney wrote: Steve Gilbert wrote: I know there must be a way to do the following: if (($foobar > 3) || ($foo="t" && $bar = "b")) {print "yup"} if (($foobar > 3) || ($foo eq "t" && $bar eq "b")) {print "yup"} Your problem is that a single '=' is assignment, not equali

RE: complex condition

2003-10-30 Thread Perry, Alan
Andrew Gaffney wrote: > >Steve Gilbert wrote: >> I know there must be a way to do the following: >> >> if (($foobar > 3) || ($foo="t" && $bar = "b")) {print >> "yup"} > >if (($foobar > 3) || ($foo eq "t" && $bar eq "b")) {print "yup"} > >Your problem is that a single '=' is assignment, not equalit

Re: complex condition

2003-10-30 Thread Andrew Gaffney
Steve Gilbert wrote: I know there must be a way to do the following: if (($foobar > 3) || ($foo="t" && $bar = "b")) {print "yup"} if (($foobar > 3) || ($foo eq "t" && $bar eq "b")) {print "yup"} Your problem is that a single '=' is assignment, not equality. '==' could also be used instead of 'eq

complex condition

2003-10-30 Thread Steve Gilbert
I know there must be a way to do the following: if (($foobar > 3) || ($foo="t" && $bar = "b")) {print "yup"} Of course this is wrong, but what I want is to print yup if $foobar >3 or $foo=t and $bar=b. so: $foobar=4 $foo=a $bar=b is true $foobar=1 $foo=f $bar=b is true $foobar=1 $foo=f $bar=a is