With questions like this, it is often easy to write a trivial program that shows what the behavior is:
#!/usr/bin/perl use strict; use warnings; if (@ARGV) { output(); exit; } print "in the first program without \$|:\n"; output(); $| = 1; print "in the first program with \$|:\n"; output(); print "in system with \$|\n"; system($^X, $0, 1) == 0 or die "could not run '$^X $0 1' failed\n"; $| = 0; print "in system without \$|\n"; system($^X, $0, 1) == 0 or die "could not run '$^X $0 1' failed\n"; sub output { for my $i (1 .. 4) { print $i; sleep 1; } print "\n"; }
This shows that the installation of $| does not affect programs running through system .
source share