in reply to Re: Ternary Quizical behaviour?
in thread Ternary Quizical behaviour?
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 :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Ternary Quizical behaviour?
by perlfan (Vicar) on Jul 10, 2020 at 20:44 UTC |
In Section
Seekers of Perl Wisdom