# transpose 1.00 by Boris New (http://www.borisnew.org)
# The fields must be separated by tabs
# perl transpose file.txt >output.txt


$"="\n";$,="\n";
$j=0;

while (<>){
	chomp;
	@F=split("\t");
	for $i (0..@F){
	$col[$j][$i]=$F[$i];

}
	$j++;
}
$a=@F-1;
$b=$#col;
for $k (0..$a){
	for $l (0..$b){
		#if ($l==0){$k--;}
		print "$col[$l][$k]\n";
		}
}
# Original file
# a	0
# b	1
# c	2
# Output file
# a
# b
# c
# 0
# 1
# 2
