my $current_href = {}; sub byValue { $current_href->{$a} cmp $current_href->{$a}; } # ... somewhere in your program $current_href = \%myHash;
Just assign hash ref to current hash in consideration
Courage, the Cowardly Dog.
In reply to Re: reusable hash value sort
by Courage
in thread reusable hash value sort
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |