Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^2: Safely reading line by line

by moritz (Cardinal)
on Jun 27, 2007 at 12:38 UTC ( #623606=note: print w/replies, xml ) Need Help??

in reply to Re: Safely reading line by line
in thread Safely reading line by line

Your post was helpful indeed, but there is a thing to consider (and the reason for me to propose crashing the interpreter ;-)

If you read data line by line, that's usually because you need it line by line.

Depending on your application it might be possible to handle incomplete lines without much change to your program, or it might not.

If there is a good reason for line based reading, and the line doesn't fit into RAM, you're lost anyway. (Not always, but still rather often).

On the other hand if the line based reading is just a method of chunking the data, then the approach that uses a read limit is probably the way to go.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2023-09-26 19:56 GMT
Find Nodes?
    Voting Booth?

    No recent polls found