sub sorted_keys_by_value { my $hash = shift; return sort {$hash->{$a} cmp $hash->{$b}} keys %$hash; } @sorted_keys = sorted_keys_by_value(\%myHash);
-- Mike
--
just,my${.02}
In reply to Re: reusable hash value sort
by thelenm
in thread reusable hash value sort
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |