my $country = $card->country; $country = $country ? $country eq q{gbr} ? q{} : qq{[\U$country]} : q{};
I am unsure of the best way to lay out nested ternaries but have found the above indented multi-line approach, with associated condition, true and false all aligned, quite readable. Others may disagree.
Cheers,
JohnGG
In reply to Re^2: How Much Is Too Much (on one line of code)?
by johngg
in thread How Much Is Too Much (on one line of code)?
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |