Problems? Is your data what you think it is? | |
PerlMonks |
Re: true/false condition - what am I doing wrong?by Marshall (Canon) |
on Dec 08, 2011 at 15:30 UTC ( [id://942465]=note: print w/replies, xml ) | Need Help?? |
This is an abuse of the ternary operator. Normally in this situation, you want to choose between 3 choices, not two!
Use the ternary operator to set a variable dependent upon a true/ false condition.
That would be preferred over: Use if and if/elsif/else conditions for more complicated things.
In Section
Seekers of Perl Wisdom
|
|