kansaschuck has asked for the wisdom of the Perl Monks concerning the following question:
But after chasing some loop problems I find the issue is that the print buffers aren't clearing. For example a "print" command to notify me that I've entered a 60 second sleep coded just before sleep later appears on the windows command prompt screen after sleep is exited. hmmmm My first fight with Perl. And I was begin to love you as much as PHP :-).
So it's off searching for a good clean way to clear the buffers. Doesn't seem to be a universal way to do it. And why do I have to do it any way?
printsometime "better late than never";
I tried
# print buffers to insure messages go to screen quickly
my $old_fh = select(OUTPUT_HANDLE);
$| = 1;
select($old_fh);
Two things, 1) Don't really understand that code and 2) what the heck it didn't work away way
Also saw the flush(3) code mentioned here by a monk.
advice, pointer, suggestion
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Flushing the print buffers.
by tilly (Archbishop) on Feb 21, 2008 at 19:58 UTC | |
by Anonymous Monk on Nov 17, 2010 at 22:26 UTC | |
Re: Flushing the print buffers.
by FunkyMonk (Chancellor) on Feb 21, 2008 at 19:58 UTC | |
by kansaschuck (Sexton) on Feb 23, 2008 at 06:01 UTC | |
Re: Flushing the print buffers.
by ikegami (Patriarch) on Feb 21, 2008 at 20:23 UTC | |
by lidden (Curate) on Feb 21, 2008 at 23:15 UTC | |
by ikegami (Patriarch) on Feb 22, 2008 at 00:07 UTC | |
by lidden (Curate) on Feb 22, 2008 at 00:37 UTC | |
by almut (Canon) on Feb 22, 2008 at 00:22 UTC | |
Re: Flushing the print buffers.
by chromatic (Archbishop) on Feb 21, 2008 at 20:19 UTC |