How can I use `pipe` to facilitate interprocess communication in Perl?
- by Shiftbit
Can anyone explain how I can successfully get my processes communicating? I find the perldoc on IPC confusing.
What I have so far is:
$| = 1;
$SIG{CHLD} = {wait};
my $parentPid = $$;
if ($pid = fork();) ) {
if ($pid == 0) {
pipe($parentPid, $$);
open PARENT, "<$parentPid";
while (<PARENT>) {
print $_;…