pipe(TALK,LISTEN); my $child = fork(); if ($child) { my $anger = 0; close(TALK); while (my $in = ) { print TALK "reply" || $anger++; last if ($anger > 10); } } else { close(LISTEN); $SIG{CHLD} = 'IGNORE'; while ($child < 18) { print TALK "commands\n"; } } #### $ perl -e 'do() || ! do() ;' Undefined subroutine &main::try