Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

by bigdogs (Novice)
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 perusing the Monastery: (4)
As of 2014-09-17 05:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (57 votes), past polls