[ALUG] Standard output redirection caching
vi5u0-alug at yahoo.co.uk
Fri Jun 1 14:27:37 BST 2007
On Fri, 1 Jun 2007, Adrian F. Clark wrote:
> The easiest solution is to put
> fflush (stdout);
> after each printf() invocation -- or equivalent in other languages. Other
> solutions tend to be less portable.
Thanks, that worked a treat. For the archives, the language is Perl,
and, with a bit of manpage searching (once you'd clued me in that the
word "fflush" was relevant,) I found out the "equivalent" is to put
use IO::File ;
autoflush STDOUT 1 ;
at the start of the program.
More information about the main