my @sorted_keys = sort keys %hash; my @sorted_vals = @hash{@sorted_keys};
does the trick with out a map. Hash keys are internally sorted after they've gone through the hashing algorithm, which usually results in an order that is Not Useful to You.
In reply to Re: sorting keys in Hash
by Trizor
in thread sorting keys in Hash
by megaurav2002
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |