$connect=0; $readpipe="READ$connect"; $writepipe="WRITE$connect"; pipe($readpipe,$writepipe); $writepipe->autoflush(); my $pid; if (!($pid=fork)) { close $writepipe; $readpipe->autoflush; select(NEW_SOCKET); while(1) { my $words; my $rbits=''; vec($rbits,fileno($readpipe),1)=1; select($rbits,undef,undef,undef); $words=<$readpipe>; print "
$words"; } close NEW_SOCKET; exit; } $connect++; close $readpipe; $writepipe->autoflush(); $pipes{$pid}=$writepipe;