Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Creating SELECT-like look-up tables as hashes

by bigdogs (Acolyte)
on Dec 01, 2013 at 16:53 UTC ( #1065157=note: print w/ replies, xml ) Need Help??


in reply to Creating SELECT-like look-up tables as hashes

In this case, the %lookup_id hash is unnecessary: you never have to find a row by id, but just to scan them all.

A simple foreach is enough:

foreach my $ref (@rows) { push @{ $lookup_fur_and_legs{$ref->{id}} }, $ref; }


Comment on Re: Creating SELECT-like look-up tables as hashes
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2014-12-21 18:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (106 votes), past polls