use IO::Handle; STDOUT->autoflush(1); [download]
select((select(STDOUT), $| = 1)[0]); [download]
In reply to Re^2: Win32: Redirect STDOUT to socket by repellent in thread Win32: Redirect STDOUT to socket by repellent