|
|
| Syntactic Confectionery Delight | |
| PerlMonks |
Re: Employing loops and constructing a matrixby NetWallah (Monsignor) |
| on Apr 24, 2012 at 05:07 UTC ( #966726=note: print w/ replies, xml ) | Need Help?? |
|
Try to get your data into a convenient structure - i'd suggest an array-of-hashrefs. Your results should be a 2-D array. Here is some code to get you started (populated with sample data). You need to figure out how to get your data into this structure: Yes - there is room for optimization, since distances are symmetric, but, at this point, operational and simple code trumps efficient code that introduces complexity.
All great truths begin as blasphemies.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||