On Sunday, November 28, 2004 at 3:36am, Gunnar Hjalmarsson wrote: > >> any suggestions to pretty this bloat ? > > > > > > my @unsorted = ( > > '5 127.0.0.1', > > '10 127.0.1.1', > > '5 27.0.0.1', > > '6 10.0.0.1', > > '1 17.0.0.1', > > '5 209.0.0.1', > > ); > > > > my @sorted = map { $_->[0] } sort { > > $a->[1] <=> $b->[1] > > || > > $a->[2] <=> $b->[2] > > || > > $a->[3] <=> $b->[3] > > || > > $a->[4] <=> $b->[4] > > || > > $a->[5] <=> $b->[5] > > } map { [ $_, split /[. ]/ ] } @unsorted;
wild.. But since the data is already in a hash, are you suggesting to first loop through the hash, pushing the data into an array, and then running the sort? just because that's not much different from what I already have.. -- 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>