[tpm] Is there a three-way version of...
linux at alteeve.com
Fri May 29 12:26:56 PDT 2009
Dave Doyle wrote:
> You can chain the ternary operator as much as you want. Laying out in
> a table-like way is adviced.
> my $title = $condition1 ? 'result1'
> : $condition2 ? 'result2'
> : $condition 3 ? 'result3'
> # ... more lines here
> : 'default';
> dave.s.doyle at gmail.com
Huh, didn't realize you could chain it like that. Thanks!
More information about the toronto-pm