Andrew Bastien wrote:
> In the spirit of TIMTOWDI, you can also do:
> 
> sort {$thehash{$a} <=> $thehash{$b}} keys %thehash

This does something else -- it sorts the hash keys according to the values,
using numeric comparison. This only works correctly if all the values are
numbers. And besides, the original poster specified the hash be sorted by
key, not by value. Hope this helps.

Cheers,
Philip

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to