in reply to Ludicrously Stupid Foreach Loop Question

perldoc -q intersection might be of marginal interest.

  • Comment on Already been thoroughly answered, but . . .