in reply to Re: Complex conditional statements
in thread Complex conditional statements
It raised another question, though: if one or more of those statements (A, B etc) is a print "..." statement, how can I make it print only if B is false (as in not B and A)?
UPDATE: Here's how my test code looks:
$test = $comment = 1; ($a = 3 and print "--> $a\n") if ($comment or $test) or print "no way! +\n";
It works if ($comment or $test) gives true, but both print statements are executed if it gives false...
--------------------------------
An idea is not responsible for the people who believe in it...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Complex conditional statements
by ikegami (Patriarch) on Jun 16, 2005 at 15:12 UTC |