my @indx; my $pos = 0; while(){ my ($id, $seq) = split /\t/; push(@indx, "$id\t$pos"); $pos = tell FH1; }