Thanks it works, but well.Now that I see that you are really monks in perl I will show my real problem. It is the following(besides that Im not good programming!!):
I have a set of data like this:
-90 120
-50 40
120 -180
-50 90
-90 45
..., which are the (X,Y)coordinates of points in a 2d matrix.
The thing is that I would like to sort this data in such a way that the order shows how close these points are from each other. The real objective behind it to make a contour plot from this points. So I have already the shape(points) in the 2d plot but now I want to connect them and have the contour. In fact I realised that regular programs draw lines between points in order of appeareance. So I got to the point of having to order them appropiately( or according to me by proximity).
What do you suggest monks?
-Arnold