- or download this
FORK: {
if ($pid = fork) {
...
die "Can't fork: $!\n";
}
}
- or download this
if (open(TO, "|-")) {
print TO $fromparent;
...
#Do whatever with $child
exit;
};
- or download this
pipe(FROM_PARENT, TO_CHILD) or die "pipe: $!";
select((select(TO_CHILD), $| = 1))[0]);