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 ( #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? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2022-05-22 01:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (78 votes). Check out past polls.

    Notices?