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
set $|=1 before you start printing. Eg.
$|=1
perl -e ' $|=1; foreach (1..10) { print "$_ "; sleep(1); }'