Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: if (defined %hash) deprecated

by Ralesk (Pilgrim)
on Oct 16, 2012 at 08:12 UTC ( #999253=note: print w/ replies, xml ) Need Help??


in reply to Re: if (defined %hash) deprecated
in thread if (defined %hash) deprecated

By assigning to a scalar or by checking truthiness, you’re forcing a scalar context, so it can be expected to behave the same – that is, return a falsy value (0) when empty and non-falsy when not (and all the bucket counts are non-falsy). Same goes for arrays which report number of elements when not wantarray.


Comment on Re^2: if (defined %hash) deprecated
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2015-07-07 02:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (86 votes), past polls