This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 3.0 patch #10 patch #9, continued
[perl5.git] / t / io.pipe
CommitLineData
378cc40b
LW
1#!./perl
2
a687059c 3# $Header: io.pipe,v 3.0 89/10/18 15:26:30 lwall Locked $
378cc40b
LW
4
5$| = 1;
6print "1..4\n";
7
8open(PIPE, "|-") || (exec 'tr', '[A-Z]', '[a-z]');
9print PIPE "OK 1\n";
10print PIPE "ok 2\n";
11close PIPE;
12
13if (open(PIPE, "-|")) {
14 while(<PIPE>) {
15 print;
16 }
17}
18else {
a687059c 19 print STDOUT "ok 3\n";
378cc40b
LW
20 exec 'echo', 'ok 4';
21}