in reply to Counting Similar Strings

What you want here is a hash.
Basically, what you do is iterate through your list of strings, assigning each one as a key to your hash. The value of each key will be the number of times that particular string has been "seen". Here is a very simple example to demonstrate what I mean:
#!/usr/bin/perl -w use strict; use Data::Dumper::Simple; my %strings; while (<DATA>) { chomp; $strings{$_}++; } print Dumper(%strings); __DATA__ string1 string2 string3 string1 string1 string7 string2
Which prints..
%strings = ( 'string3' => 1, 'string7' => 1, 'string1' => 3, 'string2' => 2 );

Have a look in the Q&A section under hashes for some more examples.

Hope this helps,
Darren :)