Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://580831]
[NodeReaper]: this is emotional, what did I do to deserve this?
[Discipulus]: Eily this percentage get higher everyday i suppose
Discipulus sometimes i'm here alone with you, bony brother
[Discipulus]: ok a Perl one: how approach the task of getting all distinct paths from the edge to a node of a pascal triangle (nobackwards)?
[Discipulus]: each node has 2 descendants only: can i just compose hash keys usinng coords?
[karlgoethebier]: Discipulus: you shouldn't smoke turkish spices before noon

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2018-03-19 10:51 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (239 votes). Check out past polls.