in reply to Oddly growing array
haven't had a chance to read the code but wouldn't something like this do what you want?
Untested
#!/usr/bin/perl use strict; use warnings; my %dups; while (<DATA>) { my $col = (split /\t/)[1]; # get the second col $dups{$col}++; # put the text into a hash and increment counter. } print +($_ , " : ", $dups{$_},$/) for (keys %dups); # print the counts
|
|---|