I should have also said that I am using the same file handle. So suppose the file handle is fp then I read some lines from fp and I hand it over to other functions that read other things from fp (in an ordered manner). les