# p_1.pl use warnings; use strict; open my $ph, '|-', 'perl p_2.pl' or die 'opening pipe to p_2: $!'; print $ph <; print "in $0: exiting \n"; exit;