#! perl -slw use strict; use IPC::Open2; $|++; my $pid = open2 \*READ, \*WRITE, 'perl -wne "$|++; chomp; print 1"'; my $read = ''; for ( 1 .. 1e4 ) { Win32::Sleep( 10 ); printf "\r$_\tGot'$read'\t"; print WRITE 'some command'; } __END__ c:\test>junk Name "main::READ" used only once: possible typo at c:\test\junk.pl line 7. 553 Got'' Terminating on signal SIGINT(2)