in reply to Hash of Hashes of Hashes of Hashes

I have gone ahead and calculated all of the possible distances between any two points between and within each data set. ...

For example (using set notation), ...

If you:

  1. posted your code for performing your calculations;

    Doing this shows your effort, and gives you the opportunity do step 2.

    It may also be the case that it would be more simple and economical to produce the required out as you generate it, rather than building your complicated data structure, and then having to iterate it a second time to produce the required output format.

  2. used Data::Dumper to display: some (very) simple inputs; and the resulting outputs;

    Displaying your inputs and outputs in this form will likely allow more monks to understand your requirements than your english description, couched in set notation.

  3. manually constructed CSV data showing how you would like the results above to be written for later import by Excel;

    Trying to write Excel format files directly just complicates matters, and excludes anyone who doesn't use Excel from testing any solution they might propose.

    Excel is perfectly happy to import CSV. CSV is very easy to write.

As is, your question would require any interested monk to reproduce your combinatory distances calculating code, before even attempting to answer your question.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy