Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Ternary Quizical behaviour?

by Eily (Monsignor)
on Jul 10, 2020 at 12:40 UTC ( [id://11119140]=note: print w/replies, xml ) Need Help??


in reply to Re: Ternary Quizical behaviour?
in thread Ternary Quizical behaviour?

But since the default is 0, this should mitigate the need for defined
I 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
    I just said what you made clear, but I did so in a very awkward way. Thanks for the ++! :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11119140]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-03-28 17:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found