in reply to Sorting My Hash

Without seeing the code it's difficult to give you the definitive 'solve' for your particular question, but in general the way to get a hash sorted is to replace the for $key (keys %hash) with a for $key (sort keys %hash).

If you want to sort on the value part of the key bear in mind that reverse'ing a hash will produce a hash where key/values have been switched, this is a nice and simple quick solution. For a nice and complex solution look into the Schwartzian Transform.