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

Re: need nextline() sub

by kwoff (Friar)
on Nov 22, 2001 at 05:30 UTC ( [id://126918]=note: print w/replies, xml ) Need Help??


in reply to need nextline() sub

First approach, you could just read one byte at a time. Then when you find a "\n", voila you have a line.

Then you might start thinking about more efficient ways to do it if that wasn't good enough. Try to read in an 8k buffer, then parse that buffer.

I'm still not sure why you couldn't use <FILEHANDLE>, though. You're talking about using seek, and that uses a FILEHANDLE too.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-19 03:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found