Hi
Can someone please explain this behavior. I was surprised with result of the following code. (And please help me come up with a better Title for this question)
I think the variable $test should be set to $val1 (1) but instead it gets set to $val2 (undef)
#/usr/bin/perl use strict; my $test; $test = 1 || (undef && undef != 0) ? undef : 0; print "test = $test\n";
OUTPUT: test =
In reply to Mixing OR with conditional operator by jockel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |