in reply to reusable hash value sort

use strict; # never forget ;-)
foreach my $key (sort values %hash) { .... }

Replies are listed 'Best First'.
Re: Re: reusable hash value sort
by thelenm (Vicar) on Jul 15, 2002 at 13:49 UTC
    This won't give you the hash keys sorted by value (what the original poster wanted)... it will give you a sorted list of the hash values. The variable name $key is misleading, and should probably be changed to $value.

    -- Mike

    --
    just,my${.02}