pipe(README, WRITEME); if (fork) { #parent code while () { # you can do other stuff in here besides reading $output .= $_; } close(README); } else { # child code print WRITEME "interesting stuff"; close(WRITEME); } #### # writer open(FIFO, "> /path/to/named.pipe"); print FIFO "Interesting stuff"; close(FIFO); #reader open(FIFO, "< /path/to/named.pipe"); while() { $output .= $_; } close(FIFO);