Re: Compare statement.

2001-05-17 Thread Jos Boumans
well, actually you cant *just* use || instead of or, seeing || binds tighter... just try running this bit of code, and you'll see what i mean: if($c || $d = 2) { print "foo" } thus, if you use || and you wish to compare like you do, you *have* to use parens correct code would therefor be if($a

Re: Compare statement.

2001-05-17 Thread Paul
--- Doug Johnson <[EMAIL PROTECTED]> wrote: > Is there a better way to write: > my $x = "return"; > if (($x = "a") > || ($x = "test" ) > || ($x = "return" ) > || ($x = "x-retun")) >{ >print("bunch of foo); >} Several =o) [and my apologies for the reformat, but I needed to fit i

RE: Compare statement.

2001-05-17 Thread Doug Johnson
know if I have any problems. Thanks again for all of the help. Doug -Original Message- From: Jeff Pinyan [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 17, 2001 10:29 AM To: Doug Johnson Cc: [EMAIL PROTECTED] Subject: Re: Compare statement. On May 17, Doug Jo

Re: Compare statement.

2001-05-17 Thread Jeff Pinyan
On May 17, Doug Johnson said: >my $x = "return"; > >if (($x = "a") || ($x = "test" ) || ($x = "return" ) || ($x = "x-retun")) > { > print("bunch of foo); > } First, that's NOT the code you have. If it IS, it's broken. if ($x eq 'a' or $x eq 'test' or $x eq 'return' or $x eq 'x-retu