in reply to Working on a file.

And the file format is...

Are columns separated by spaces, or is it CSV file, or is it some XML format?

If you already read file and have column stored in array, let's call it @species then it is simple:

my %hash; for (@species) { $hash{$_}++; } print "Number of different species: ", 0+(keys %hash), "\n"; for (sort keys %hash) { print "$_: ", $hash{$_}, "\n"; }

Replies are listed 'Best First'.
Re^2: Working on a file.
by scriptinperl (Initiate) on Jan 20, 2010 at 19:14 UTC
    It is a CSV File Zwon.

      Then have a look on Text::CSV, it will allow you to parse your file.

        Its nice Thank You Folks !!