Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: problem with array of hashes

by moritz (Cardinal)
on Oct 09, 2012 at 11:09 UTC ( #997980=note: print w/ replies, xml ) Need Help??

in reply to problem with array of hashes

Hash keys aren't ordered, so there is no getting of the "last" hash key or so.

So the question is, how do you identify which hash key you want to retrieve? If it's the key with 't' as a value, you have to iterate through the whole hash -- which likely means that the data structure is poorly chosen for you application. Also if you want to search by value, what do you do if multiple keys have the same value?

Or is there any other logic by which you identify the '41'?

Comment on Re: problem with array of hashes
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2015-10-10 05:34 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (254 votes), past polls