Did you turn on STDOUT autoflushing with $|=1 as described in perlvar?
In reply to Re: Screen Output Buffering by ccn in thread Screen Output Buffering by mvaline