Take a look at perlapio.
In reply to Re: Flush all opened STDIO streams by oiskuu in thread Flush all opened STDIO streams by dmitnin