byron wise wrote:
> 
> I have a hash that needs to be sorted acording to the keys.  Then put the
> values in an array.  Will the following work?
> 
> @sorted = sort keys %thehash;

no. That gives you the sorted keys, not the values. Use this:

@sorted = map { $thehash{ $_ } } sort(keys(%thehash))

-- 
Ned Konz
currently: Stanwood, WA
email:     [EMAIL PROTECTED]
homepage:  http://www.bike-nomad.com

---
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