in reply to stumped on a complex data structure
UPDATE: Ignore this. I misread the question. (The question at the bottom's still valid though).
my %HoA = ( 0=>[ 1, 2, 3 ], 1=>[ 4, 5, 6 ], 2=>[ 7, 8, 9 ] ); print join'', map @{ $HoA{ $_ } },sort{$a<=>$b} keys %HoA; 123456789
One point. If your hash keys are consecutive integers starting from 0, why use a HoA and not a AoA?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: stumped on a complex data structure
by ikegami (Patriarch) on Nov 15, 2004 at 19:43 UTC | |
by BrowserUk (Patriarch) on Nov 15, 2004 at 19:47 UTC | |
by kfarr2 (Novice) on Nov 16, 2004 at 12:51 UTC | |
by Anonymous Monk on Nov 16, 2004 at 21:20 UTC |