|
|
| Syntactic Confectionery Delight | |
| PerlMonks |
Re: Perl ternary operator styleby SimonClinch (Chaplain) |
| on May 30, 2011 at 09:16 UTC ( #907288=note: print w/ replies, xml ) | Need Help?? |
|
Note: The OP asked about having two invocations of a function, not one. But of course, the mere fact respondents misread it, suggests it needs to be made more readable. I would reserve the ternary operator for simpler situations rather than for chaining functions (logically for three functions you need two such operators on the same line - gets even more hairy!). There is also an omission - if the second function call returns false, it doesn't get the default value because it is performed on the wrong branch of the ternary for that. I think the simplest way, probably most compatible with your style is:
One world, one people
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||