Hi everyone, I'm not an expert Perl programmer and I'm trying to sort a
hash.
I know how to sort it by it's keys, but this time it should be sorted by its
values.
So if I have
%hash = (
Apples => 1,
apples => 4,
artichokes => 3,
Beets => 9,
);
then it should be sorted and printed in this way:
Beets 9
apples 4
artichokes 3
Apples 1
Can anyone help me with this problem?
Thanks