while(){ #read a line while(){ #read a line last; # go back to the main loop, but how to continue from this point in the next iteration ? } }