in reply to intersection of N arrays
Take a look at List::Compare - it can compare two or more lists. It does exactly what you are asking for.