in reply to Re^10: Saving sql results to an array all rows?
in thread Saving sql results to an array all rows?
my @data = map { [$_, split(/\./, (split /\s+/, $_)[1])]} @all_rows;
That isn't necessary. I don't know why you did that! You transformed @all_rows using the same buggy code Krambambuli noted in his last post. Try the code below, without the transformation.
my @sorted = map{$_->[0]} sort {$a->[1] cmp $b->[1]} map { [$_, inet_aton($_->[1]) ]} @all_rows; print Dumper \@sorted;
(Also, leave the backslash before print Dumper \@sorted;. It's there to print out the array as a whole using Data::Dumper. Did you paste my example code and run it?)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^12: Saving sql results to an array all rows?
by learningperl01 (Beadle) on Aug 21, 2008 at 17:33 UTC | |
by learningperl01 (Beadle) on Aug 21, 2008 at 17:52 UTC |