in reply to Non-blocking pipe write

I had a similiar problem using TCP/IP sockets, and a fellow monk suggested that I solve the problem by setting flags on the handle. This worked great as long as I ran on UNIX. Unfortunately this didn't work for me since my script has to work on UNIX and Windows, but it may work for you.
use Fcntl; my $flags; fcntl(SERVER_HANDLE, F_GETFL, $flags) || die $!; # Get the current fla +gs on the filehandle $flags |= O_NONBLOCK; # Add non-blocking to the flags fcntl(SERVER_HANDLE, F_SETFL, $flags) || die $!; # Set the flags on th +e filehandle