Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Wrong result for "length keys %$hashref"?

by philipbailey (Chaplain)
on Mar 14, 2011 at 19:48 UTC ( #893132=note: print w/replies, xml ) Need Help??


in reply to Wrong result for "length keys %$hashref"?

The documentation of length answers your question:

'length Returns the length in characters of the value of EXPR. If EXPR is omitted, returns length of $_. Note that this cannot be used on an entire array or hash to find out how many elements these have. For that, use "scalar @array" and "scalar keys %hash" respectively.'

  • Comment on Re: Wrong result for "length keys %$hashref"?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://893132]
help
Chatterbox?
[LanX]: ]t
[LanX]: am I the only one who first thinks scifi when a post starts with "Solaris"?

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (14)
As of 2017-03-23 19:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (294 votes). Check out past polls.