7.3.1 Perl script buffering

A handy solution for Perl scripts to the above problem is to use:

# Turn all buffering off.
select((select(STDOUT), $| = 1)[0]);
select((select(STDERR), $| = 1)[0]);
select((select(STDIN), $| = 1)[0]);