Your approach implies that the data is essentially analog to a DB table. But you are losing the possibility to index the data by "zip" (?) or "state" with a hash lookup.
> Searching a table like that is simple,
I don't see why using 3 nested while each loops are more complicated. It's pretty generic and keeps all data available. (Though you have to take care not to mess up the each iterator)
> but does cost in performance because you have to examine each row for every search.
Hmm, if I wanted to represent a DB table I'd use an AoA with associated index hashes.
Probably as object or tied array.
I'm not very experienced with NoSQL but this might go into the same direction.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
°) a cursory look revealed Data::Table not sure if that's a good example though.
In reply to Re^2: Get all hash value into array
by LanX
in thread Get all hash value into array
by Magnolia25
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |