while () { chomp; ($first,$second)=split ("\t"); my @first_column= split '\n',$first; my @second_column=split '\n',$second; my $a=0; my $b=0; print "$first_column[$a]"; print "\t$second_column[$b]"; my $e=$second_column[$b]-$first_column[$a]; print "\t$e\n"; $a++; $b++; }