On Tue, Aug 09, 2005 at 05:00:44PM -0400, Jeff 'japhy' Pinyan wrote: > On Aug 9, Jeremy Kister said: > > >>my @s = map $_->[ 1 ], > >> sort { $a->[ 0 ] cmp $b->[ 0 ] } > >> map [ inet_aton( $_->{ N } ), $_ ], > >> @a; > > > >Now to analyze WTF we're doing here :) > > Paul's answer had a slight typo in it -- he was comparing $a->[0], > $a->[1], $a->[2], and $a->[3], when he should have been comparing $a->[1], > $a->[2], $a->[3], and $a->[4].
Ah, yes. I tried to keep as much of Jeremy's original code as I could, but I obviously kept too much. Thanks for pointing out the problem. > As for John's answer, it does the same thing as Paul's would have. It > just bundles the logic by using the Socket module's inet_aton() function. Which is a superior solution, so Jeremy chose correctly. -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>