Here's where am stuck, how do I loop the first item on NameA column to iterate over all NameBs and return the smallest distance, together with both corresponding NameA and NameB entries then move to the next row and repeat above, and so on till end of file.
What does that mean?
?"Loop first item"? What distance?
If you could please use the numbers from the three lines of data you posted, and in pencil-and-paper fashion , solve the problem step by step for those three lines, this would help me understand what you're asking
Its hard to interpret a program that doesn't work to understand the question being asked
Probably need to read the file into a hash of arrays first, then query it like a database, do some calculations ...
In reply to Re: Nested foreach loops
by Anonymous Monk
in thread Nested foreach loops
by keienn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |