Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
foreach my $value ( sort { length($b) <=> length($a) } values %has +h ) { print "Value: $value\n"; print "Key: ???\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Print key when sorting hash by value
by choroba (Cardinal) on Sep 26, 2014 at 16:08 UTC | |
by Anonymous Monk on Sep 26, 2014 at 16:18 UTC |