Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Multithreading a large file split to multiple files

by jeffenstein (Pilgrim)
on May 16, 2018 at 08:35 UTC ( #1214618=note: print w/replies, xml ) Need Help??


in reply to Re: Multithreading a large file split to multiple files
in thread Multithreading a large file split to multiple files

From the IO::Handle documentation:

# setvbuf is not available by default on Perls 5.8.0 and later. use IO::Handle '_IOLBF'; $io->setvbuf($buffer_var, _IOLBF, 1024);

However, the PerlIO::buffersize module adds a PerlIO layer that can set the buffersize when opening a file:

open my $fh, '<:buffersize(65536)', $filename;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1214618]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2018-05-23 04:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?