Try adding $|++; at the top of your script.
RIP Neil Armstrong
In reply to Re: Perl stdout timing/formatting by BrowserUk in thread Perl stdout timing/formatting by dburke