On Tue, 21 May 2002 19:23:06 +0100, Barry Jones wrote:

> How can I sort a hash's keys in reverse order?

Two options would be

@keys = reverse sort keys %hash; # reverse ASCII ordering

@keys = sort { $b <=> $a } keys %hash; # reverse numeric ordering

There are many other possibilities. It really depends on what you mena by
"order".

Dave...

-- 
  Don't dream it... be it

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to