grep {$x=$_;grep{$_ eq $x} @ar1} @ar2; [download]
In reply to Re: Count of words that match in an array by BUU in thread Count of words that match in an array by Al Shiferaw