|Just another Perl shrine|
intersection of N arraysby basscakes (Acolyte)
|on Jun 30, 2004 at 22:24 UTC||Need Help??|
basscakes has asked for the wisdom of the Perl Monks concerning the following question:
i think i didn't ask my question right last time, but i've done a lot of experiments. anyway, supposing my data looks like this (more or less same as last time):
I want the intersection of those three arrays. That is, in the above example, the correct answer is [ 3 ].
Here's 2 other examples:
answer: [ 5 ]
answer is [ 5, 6 ]
answer: [ ] # undef
i don't care to know which $id they were in, i JUST want the array that represents elements that showed up at least once in ALL arrays. thanks!