Perl: hash numerical sort# Unix - 噫吁兮,危乎高哉
f*y
1 楼
I have a hash like this:
%h = (
org, 51,
com, 7,
gov, 55,
net, 2,
biz, 5
);
How do I print it out with its value numerically sorted? It would look like:
gov 55
org 51
com 7
biz 5
net 2
Any suggestion would be appreciated. Thanks a lot!
%h = (
org, 51,
com, 7,
gov, 55,
net, 2,
biz, 5
);
How do I print it out with its value numerically sorted? It would look like:
gov 55
org 51
com 7
biz 5
net 2
Any suggestion would be appreciated. Thanks a lot!