So it sounds like you want the intersection of two arrays - see for example How can I find the union/difference/intersection of two arrays?. In the first example there, you can get your count via my $count = @female_simpsons;, or more directly by my $count = grep ... - note however this might not be the best approach if your arrays are large because it will consume quite a bit of memory.
In reply to Re: check all elements of an array against another array...
by Anonymous Monk
in thread check all elements of an array against another array...
by tjo7777
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |