Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 having an uproarious good time at the Monastery: (4)
As of 2014-10-31 04:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (214 votes), past polls