But since the default is 0, this should mitigate the need for definedI don't understand what you mean here. As far as I know, defined $test{'a'} ? $test{'a'} : 0 and $test{'a'} // 0 are strictly equivalent.
Beyond that ++ for the answer, the use of // here is a clear winner :)
In reply to Re^2: Ternary Quizical behaviour?
by Eily
in thread Ternary Quizical behaviour?
by bliako
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |