Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: How to read every 16 line of file ?

by Anonymous Monk
on May 15, 2011 at 01:09 UTC ( #904898=note: print w/replies, xml ) Need Help??

in reply to How to read every 16 line of file ?

Just read them all and discard 15 out of 16. You really do not need to get any more clever than that. The way the processing actually will work, with disk buffers and all that, being smarter won't make the slightest bit of difference, and might well make it slower.
  • Comment on Re: How to read every 16 line of file ?

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2023-03-21 17:49 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (60 votes). Check out past polls.