|
|
| "be consistent" | |
| PerlMonks |
Re^3: Conditional Operator Confusionby Herkum (Parson) |
| on Nov 30, 2006 at 16:44 UTC ( #586999=note: print w/ replies, xml ) | Need Help?? |
|
The trinary is much like any other operator, for example ==. Lets try this example,
Here, you get the result of the == operator, is $a equal $b. If they match it returns true, if they don't match it returns false. The trinary works in a similar manner except you are setting the value returned instead of the implied value of other operators.
This does the same thing as the first example, except you are explicitly setting the value returned. Does this help?
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||