maybe using the map map {print "Key is -$_- Value is $condorhash{$_} \n"} (sort(keys %condorhash));
if you need 1 array; my @a = map {$condorhash{$_}} (sort(keys %condorhash)); Marcos -----Original Message----- From: Dan Muey [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 4:30 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Reordering Hash > I need to order a hash, called condorhash, based on the key > value. So what I did is: > > my @condorhash = keys(%condorhash); > sort @condorhash; > > Now I want to take the order of the array and apply it to the > hash while keeping the values associated with the key. I know > there is some way to make a pointer run down through the > hash, but I don't know how. Is this what you're lookinf for:? for(sort(keys %condorhash)) { print "Key is -$_- Value is $condorhash{$_} \n"; } HTH DMuey > > Thanks, > > Brian -- 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]