in reply to HOA with array slice?
Something like this ought to work:
my( $color, $fruit ) = @{$hoa->{keytwo}}[$idx_color, $idx_fruit];
There's nothing wrong with your use of a HoA. It is true, however, that a lot of thought should go into selecting the construction of complex datastructures. The right layout makes all the difference in code complexity/simplicity.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: HOA with array slice?
by northwind (Hermit) on May 25, 2005 at 17:48 UTC |