pipe(my $reader, my $writer); # Create a pipe if (my $pid = fork()) { # In parent: read one line from the pipe and print it print "Message from child: ".<$reader>; } else { # In child: print a line of text to the pipe print $writer ("Hello, parent!\n"); }
In reply to Re: Pipes (for interprocess communication)
by robin
in thread Pipes (for interprocess communication)
by penguin_asylum
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |