pipe(FROM_P, TO_C) or die "pipe: $!"; select(((select(TO_C), $| = 1))[0]); if (!(my $pid = fork)){ close(TO_C); #close(FROM_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'){ Win32::GUI::MessageBox(0,"Exit","GMS"); sleep(20); #To allow time to read the MessageBox... if it ever comes up... exit; } } }