> 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.
>
> 1. H3 1550
> 2. H3 234
> 3. H4 156
> 4. H2A 125
>
> Is there a quick one liner for this or do I need to find
> the max in each hash, store them in an array, and then sort
> the "array of hash maxima" separately, while maintaining the
> key/value associations?
perldoc -q "sort a hash"
-dave
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]