Check out perlvar and the variable $|. Simply put setting $| = 1; should flush to STDOUT immediately instead of at the end of the program.
In reply to Re: Printing inside a loop
by kutsu
in thread Printing inside a loop
by no21
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |