#!/usr/bin/perl
# The Missing Textutils, Ondrej Bojar, obo@cuni.cz
# http://www.cuni.cz/~obo/textutils
#
# 'coldatasetscnt' is like running "cut -fX | sort -u | wc -l" for every column
# X in the input.
#
# $Id: coldatasetscnt,v 1.3 2008/10/21 06:05:14 bojar Exp $
#

while (<>) {
  chomp;
  @line = split /\t/;
  for(my $i=0; $i <= $#line; $i++) {
    $seen[$i]->{$line[$i]}++;
  }
}

@data = map {scalar keys %{$_}} @seen;
print join("\t", @data)."\n";
