Help for this page
my @points; ... # adapt the method you use to fill your three arrays # to create this kind of data structure using the # example above.
# Sort by z first, then sort by x for each point @points = sort { $a->{x} <=> $b->{x} } sort { $a->{z} <=> $b->{z} } @points;