You're right. Adding $OUTPUT_AUTOFLUSH to delayed.pl does make the piped open work as desired. However, using the suggestion in perlipc for
Background Processes does not require any addition to delayed.pl.
# name: basicipc.pl (non-filtering version)
#
# Purpose: Receive the STDOUT from a secondary app and simply
# mirror it to our STDOUT.
my $cmd = 'perl delayed.pl';
system("$cmd &");
Why do these function different? I suppose it could be as simple as the fact that delayed.pl script detects where its STDOUT is being directed and chooses to buffer in the case of open with pipe. But then my question would be, is there a way for open to force delayed.pl to not buffer without having to edit delayed.pl itself? Maintaining that delayed.pl is a simulation of a real executable and not simply another perl script.
- Miller