- or download this
my @unsortedArray;
foreach my $received_xml_post (@ {$xml_post_array{'data'}})
...
my @sortedArray = sort { $a->{RouteDistance} <=> $b->{RouteDistance ||
+ $a->{Distance} <=> $b->{Distance} } @unsortedArray;
- or download this
my @unsortedArray;
foreach my $received_xml_post (@ {$xml_post_array{'data'}})
...
}
my @sortedArray = sort { if( $a->{RouteDistance} == 0) {return -1} els
+e {$a->{RouteDistance} <=> $b->{RouteDistance} $a->{Distance} <=> $b-
+>{Distance} } @unsortedArray;
- or download this
sort {
$a->{routedistance} && $b->{routedistance}
? $a->{routedistance} <=> $b->{routedistance}
: $a->{distance} <=> $b->{distance}
} @ar;
- or download this
#!/usr/bin/perl
use warnings;
...
print "ID: ".$sorted_row->{'ID'}." Distance: ".$sorted_row->{'Dist
+ance'}." RouteDistance: ".$sorted_row->{'RouteDistance'}."\n";
}