Force output during long process

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

On Sep 6, 2:00 pm, bwv549 [email protected] wrote:

Thanks

To flush the buffer, use $stdout.flush
To not use a buffer at all, use $stdout.sync = true

HTH,
Chris