in reply to See if arrays match

Where's the @list in your code? Do you mean @info? PhiRatE makes good points about strict and warnings. Also, note that $a and $b, besides being obfuscatory names (what values are they supposed to be storing? the name does not explain their function), are special variables used by Perl for sort; using them is asking for trouble at some point down the road.

All that said, the key to your problem, in one fashion or other, is to iterate over the list and store array elements as hash keys; as the value stored in the hash you will likely want a counter. If you are more specific about what you want, a more precise answer can be given.

Makeshifts last the longest.