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 (Friar)
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2020-11-27 12:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?