undef my %hash; open IN, $ARGV[0]; while(){ chomp $_; my ($name,$number,$color) = split /\t/, $_; $hash{$name}{$number}{$color}++; }