You can always have a channel between the parent and child to send messages back and forth.
pipe my $reader, my $writer;
my $pid = fork();
if ( $pid == 0 ) {
close $reader;
...
}
else {
close $writer;
my $msg_from_child = <$reader>;
....
}
Not a very convenient way of programming, but it should not be "unstable".
innaM source
share