pipe(FROM_P, TO_C) or die "pipe: $!"; select(((select(TO_C), $| = 1))[0]); if (!(my $pid = fork)){ close(TO_C); my $running = 1; while(my $line = ) { #Win32::GUI::MessageBox(0,"Child Pid $$ just read this: $line","GMS Alert"); chomp($line) if($line =~ m/\n$/o); if(lc($line) eq 'exit'){ exit; } } }