http://qs1969.pair.com?node_id=873405


in reply to Re: how to read every 10 line from input text file ?
in thread how to read every 10 line from input text file ?

In short, if you read to the end of the file, and then the other process add more, then your perl process may not see any more unless you re-open the file, as perl will have buffered the contents of the file already.

It's not a case of the Perl process already having buffered the contents, it's that the eof error has been set. This can be cleared using seek and further reads can then be performed, as demonstrated in the documentation.

Cheers,

JohnGG