in reply to hash ordered by an array
Just a guess - do you need the values in a particular order? That's easy with a hash slice.
my %hash = ( cat => 7, dog => 3, cow => 9, ); my @array = ("dog","cat","cow"); my @ordered_values = @hash{@array}; # (3, 7, 9)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: hash ordered by an array
by coldy (Scribe) on Jul 13, 2008 at 11:18 UTC |