while(my $pair1 = read_file_line($f1) and my $pair2 = read_file_line($f2)){