Chris Shea
9/6/2007 8:52:00 PM
On Sep 6, 2:00 pm, bwv549 <jtpri...@gmail.com> wrote:
> I'm running a long process and need to give some feedback to the user
> (command line program). Is there some way to force output at a given
> step of execution? Many times it seems that the output is spooled and
> then printed to the screen all at once.
>
> e.g.:
>
> # ... inside some_very_long_program
> puts "working..." # needs to display here and not spool it until
> later
>
> Thanks
To flush the buffer, use $stdout.flush
To not use a buffer at all, use $stdout.sync = true
HTH,
Chris