in reply to
Perl only prints complete lines?
You're hit by line buffering of STDOUT. Try
$| = 1
before the loop.
Comment on
Re: Perl only prints complete lines?
Download
Code
In Section
Seekers of Perl Wisdom