Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: how to read every 10 line from input text file ?

by johngg (Canon)
on Nov 24, 2010 at 10:32 UTC ( #873405=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://873405]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2023-03-31 00:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (74 votes). Check out past polls.

    Notices?