Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Perl Read-Ahead I/O Buffering

by sth (Priest)
on Oct 26, 2006 at 20:34 UTC ( #580831=note: print w/ replies, xml ) Need Help??


in reply to Perl Read-Ahead I/O Buffering

Have you tried read()? If the records are fixed length you could read in for a length * number rows and then split on the newline or read in a big chunk and add logic to keep a partial record from the end of the buffer and add to it on the next read.

while ( read($fh, $buf, $len) ) { @lines = split "\n", $buf; . . . }
It may be faster, worth a try.


Comment on Re: Perl Read-Ahead I/O Buffering
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2014-09-01 15:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (14 votes), past polls