in reply to Re: Increasing the write buffer
in thread Increasing the write buffer
There are three buffering states:
If a handle is buffered, line buffering is always and only used when the file handle is connected to a terminal.
So, if you're writing to a file, \n won't flush. But if you're writing to STDOUT and it hasn't been redirected, \n will flush if buffering wasn't turned off.
You can turn on buffering using
use IO::Handle qw( ); FH->autoflush(0);
You can turn off buffering using
use IO::Handle qw( ); FH->autoflush(1);
You can flush manually using
use IO::Handle qw( ); FH->flush();
* — Well, I *think* the buffer size is 4KB.
|
|---|