![]() |
|
We don't bite newbies here... much | |
PerlMonks |
Re: sorting/outputby dpuu (Chaplain) |
on Dec 09, 2004 at 21:25 UTC ( #413690=note: print w/replies, xml ) | Need Help?? |
I found the code a bit confusing, but I think what is happenning is that you are creating an array that maps a distance from the centre to a record -- but you don't account for the possibility of two records with the same distance.
The approach you probably want to use is to create a reshref for each record, and then sort those by distance. i.e.
You can then iterate ocver the records, and print them.
--Dave Opinions my own; statements of fact may be in error.
In Section
Seekers of Perl Wisdom
|
|