"be consistent" | |
PerlMonks |
Re: retrieving from a hash numericallyby dirac (Beadle) |
on Jul 04, 2005 at 13:27 UTC ( [id://472230]=note: print w/replies, xml ) | Need Help?? |
my (%H, @keys, @vals); @vals = qw (e c a b d); @keys = (5, 3, 1, 2, 4); @H{@keys} = @vals; print map{"$_: $H{$_}\n"} sort{ $a <=> $b } keys %H;
In Section
Seekers of Perl Wisdom
|
|