in reply to Creating SELECT-like look-up tables as hashes
But, as BUK indicated, filtering is better done by SQL against a database.## Instead of ## my %lookup_id = map { $_->{id}, $_ } @rows; my %lookup_fur_and_legs; push (@{ $lookup_fur_and_legs { $_->{fur} . $_->{legs} } }, $_ ) for +@rows; # This now allows, given any fur-legs combo : $fl, for my $row (@{ $lookup_fur_and_legs{$fl} } ){ # WHatever you want with each row for thes $fl ... }
When in doubt, mumble; when in trouble, delegate; when in charge, ponder. -- James H. Boren
|
|---|