in reply to Hash sorting (by value) woes

Another way (probably a little slower):
map { print "$etcpw->{$_}\n"; } sort { [ split /:/, $etcpw->{$a} ]->[2] <=> [ split /:/,$etcpw->{$b} + ]->[2] } keys %{$etcpw};
--------------
It's sad that a family can be torn apart by such a such a simple thing as a pack of wild dogs

Replies are listed 'Best First'.
Re^2: Hash sorting (by value) woes
by dragonchild (Archbishop) on Feb 24, 2005 at 17:07 UTC
    [ split /:/, $etcpw->{$a} ]->[2]
    can be rewritten as
    (split /:/, $etcpw->{$a})[2]

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.