Hello Pat, You can do it like so: my %hash; foreach(sort {$hash{$a} <=> $hash{$b} } keys %hash) { .... }
Shawn ----- Original Message ----- From: "Postman Pat" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 24, 2002 1:46 AM Subject: sorting a hash by value. > Greetings, > I would like to sort a hash by value. The hash values are numbers. I would > like to sort this by desceding order. How would I do this? I have searched > and found nothing on it. I have found lots on sorting by key though... > Please help dudes! > > Ciao > > LK > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]