in reply to Comparing 2 arrays too find the total number of identical elements.

OK, here's the quick answer: Array in perlfaq, Array on PerlMonks Q&A.

Basically you need hash to track the elements of the arrays. Here's a clue:

my @array1 = qw(perl monks camel); my @array2 = qw(node thread monks); my %hash; for (@array1, @array2) { $hash{$_}++; }
If you iterate the %hash you'll get list of unique elements and the number of each element in the arrays. You can do that, right? I mean the hash iteration. Let us know after you try that. Good luck, barrymcv :-)

Oh wait, why didn't you tell us you already asked about this? What did you learn from there, and what went wrong so you need to ask again with a bit different question?


Update: Added ref to his previous question.

Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!