in reply to Merging an array into an AoH
Are those ids unique? They look like it. If so, I think a hash of hashes would be a better data structure for your problem.
my $box = { q01 => {}, ... q03 => {} }; #this should keep them in the right order my @sorted_keys = sort {lc $a cmp lc $b} keys %{$box} ; for my $id (@sorted_keys) { $box->{$id}{value} = shift @results; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Merging an array into an AoH
by neniro (Priest) on May 21, 2004 at 20:53 UTC |
In Section
Seekers of Perl Wisdom