I have a computationally expensive task in perl, and would like to inform the user that computation is ongoing by printing out a period after each portion of the computation is
See the FAQ How do I flush/unbuffer an output filehandle? Why must I do this? and note:
Besides the
$|
special variable, you can use binmode to give your filehandle a:unix
layer, which is unbuffered ...
For the general problem, you might want to look at Time::Progress:
%b
%B
progress bar which looks like:
##############......................