in reply to Re^4: Most elegant way to dispose of duplicates using map
in thread Most elegant way to dispose of duplicates using map

I'd suggest using a very careful delimiter if you want to take a key and serialize it in this manner. if for instance, you used a comma, you have a key value pair of "1,2" and "3" and another of "1" and "2,3", they may evaluate the same.
  • Comment on Re^5: Most elegant way to dispose of duplicates using map

Replies are listed 'Best First'.
Re^6: Most elegant way to dispose of duplicates using map
by johngg (Canon) on Oct 31, 2006 at 14:53 UTC
    Agreed. I chose a colon in this example as there were none in any of the strings that were going to form the keys. Similarly, a simple concatenation is also potentially dangerous, e.g. "frederick" and "son" vs. "fred" and "erickson". However, I should have stressed the point so thank you for doing it for me.

    Cheers,

    JohnGG