On Mon, May 06, 2002 at 12:22:15PM -0400, David Gray wrote:
> > Now I've got an array of hashes, where each hash can have  
> > different keys e.g.,
> > 
> > @aoh = ( {H3 =>234, H1 =>127, DNA =>1, p135 =>167},
> >             {H4=>24,  H3=>1550, DNA =>25, p39 =>67},
> >             {H3 =>34, H2A =>125, DNA =>5, p32 =>7},
> >             {H3 =>24, H4 =>156, DNA =>123, p12 =>13}
> >     ) 
> > And I'd like to order the array elements by virtue of the 
> > biggest value in the hash. 

....

> perldoc -q "sort a hash"

Nope, he's looking for a *nested* sort, since he has to find the largest
value 'values %$a' and 'values %$b'.

And as a nice addon, he mentions that the keys of the hashes can vary.

-- 
                       If we fail, we will lose the war.

Michael Lamertz                        |      +49 221 445420 / +49 171 6900 310
Nordstr. 49                            |                       [EMAIL PROTECTED]
50733 Cologne                          |                 http://www.lamertz.net
Germany                                |               http://www.perl-ronin.de 

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

Reply via email to