in reply to Re: How to connect more arrays to a new array
in thread Find unique elements from multiple arrays

The problem is how to define equity once you start slinging around tied or overloaded objects. By equal value, by equal reference, or by entirely different semantics? It's a question with very individual replies depending on the situation, and there can't be a universal solution. As for the undef, which is actually a common case, you are right, I had forgotten about that, even though I've fixed it before.
my @new = do{ my (%seen, $seen_undef); grep defined ? !$seen{$_}++ : !$seen_undef++, @a, @b, @c, @d; };

Makeshifts last the longest.

  • Comment on Re^3: How to connect more arrays to a new array (accounting for undef)
  • Download Code