in reply to flushing by default
I am interested in how I can make autoflush a default behaviour for all of the filehandles I open
Put this somewhere at the beginning of your program:
$|++;
Setting $| to a non-zero value forces a flush right away and after every write or print on the currently selected output channel. IO::Handle makes use of $| as well.
-- Kirill
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: flushing by default
by hungry_john (Acolyte) on Jan 19, 2008 at 18:28 UTC | |
Re^2: flushing by default
by spx2 (Deacon) on Jan 19, 2008 at 17:54 UTC | |
by kirillm (Friar) on Jan 19, 2008 at 18:00 UTC |
In Section
Seekers of Perl Wisdom