On 8/9/2005 8:43 AM, John W. Krahn wrote:
> Jeremy Kister wrote:
>>I've apparently dumbed down my code and question a bit too much:  I have
>>multiple hashrefs in each element of the array, and I need the resulting
>>sorted array to contain all the data in the original array, simply
>>sorted by the value of N.
>>
> my @s = map  $_->[ 1 ],
>         sort { $a->[ 0 ] cmp $b->[ 0 ] }
>         map  [ inet_aton( $_->{ N } ), $_ ],
>         @a;

After a good night's sleep <yawn> I've woken to two really great answers.

I'm using John's solution because I couldnt get Paul's to work :-/

Now to analyze WTF we're doing here :)


Thanks John and Paul!!

-- 

Jeremy Kister
http://jeremy.kister.net./




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to