Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2014-08-23 14:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (174 votes), past polls