And also do $|++; at the top too, so that buffering of stdout is disabled.
Why?
In reply to Re: Re: WRITING TO FILES by chromatic in thread Writing to files by rxguil