in reply to Re^5: how to kill background process when script exit?
in thread how to kill background process when script exit?

interesting...I agree with you (see my last reply to Corion), but when I run your second script I get this (no fooling):
perl -e ' open my $fh, q{perl -e '\''sleep 1; print STDERR "C"'\'' |}; print "P"; ' CP
(I couldn't use 'say', you must have a later version of perl than I?)

Replies are listed 'Best First'.
Re^7: how to kill background process when script exit?
by ikegami (Patriarch) on Feb 21, 2011 at 01:05 UTC

    say was introduced 4 years ago in 5.10.

    Buffering is delaying when you see the output.