in reply to How to test for reliable select()?

Sockets can be used instead of pipes. The following works on Windows (and on unix, of course):

use Socket qw( AF_UNIX SOCK_STREAM PF_UNSPEC ); sub _pipe { socketpair($_[0], $_[1], AF_UNIX, SOCK_STREAM, PF_UNSPEC) or return undef; shutdown($_[0], 1); # No more writing for reader shutdown($_[1], 0); # No more reading for writer return 1; }

(From Re^4: why IPC::Open3 can't execute MS-DOS "dir" command?)