Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: code that fails to act as expected...

by varian (Chaplain)
on Jun 13, 2007 at 11:47 UTC ( [id://620919]=note: print w/replies, xml ) Need Help??


in reply to code that fails to act as expected...

When called in list context (like here) each will indeed give the next key/value pair. However one cannot tell for sure that the first key returned is abbot (and its value costello) because hashes are *not* sorted and the key sequence is done (more or less) randomly.

BTW when you call each in scalar context it would only return the key, not the related value.

The keys function will help you sort the other question.

  • Comment on Re: code that fails to act as expected...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (8)
As of 2024-04-18 08:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found