Help for this page
my $pid = open(CHILD, "-|", 'child', @child_args) if ($pid) { while (<CHILD>) { $logger->($_) } } close(CHILD);
if (my $pid = open(CHILD, "-|")) { while (<CHILD>) { $logger->($_); } ... open(STDERR, '>&STDOUT'); exec('child', @child_args) || die "exec failed"; }