in reply to advancing in file read

Or, you can switch between two states of your loop, one looking for the first line, and the second looking for the next line:
my $state = 0; foreach my $line (<TF>){ if($state){ # do whatever you need with the "next" line $state = 0; } else { # do what you normally do if($next_line_needed){ $state = 1; } } }