Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Safely reading line by line

by cdarke (Prior)
on Jun 27, 2007 at 12:59 UTC ( [id://623609]=note: print w/replies, xml ) Need Help??


in reply to Safely reading line by line

You could just read one char at a time, looking for a newline to terminate the line. You can use read for that, or local $/=\1;. Assuming you have not switched buffering off, the data will not be transferred from the disc one char at a time, only from the buffer. It is then easy to impose a limit for a line length.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-04-19 06:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found