in reply to sorting a hash
From your expected output you probably meant sorting the keys and not the values of the hash.
should answer your question (decending numeric key sorting).foreach ( sort {$b <=> $a} keys %hash ){ print $_," ",$hash{$_},"\n"; }
Enjoy,
Mickey
|
---|
In Section
Seekers of Perl Wisdom