- or download this
$old_fh = select(OUTPUT_HANDLE);
$| = 1;
select($old_fh);
- or download this
select((select(STDERR), $| = 1)[0])
- or download this
use IO::Handle;
OUTPUT_HANDLE->autoflush(1);
- or download this
use FileHandle;
STDOUT->autoflush(1);
- or download this
use IO::Handle;
autoflush ONE_HANDLE 1; # unbuffer for clarity
autoflush ANOTHER_HANDLE 0; # buffer this for speed