This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 2.0 (no announcement message available)
[perl5.git] / t / io.pipe
CommitLineData
378cc40b
LW
1#!./perl
2
3# $Header: io.pipe,v 2.0 88/06/05 00:13:05 root Exp $
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 {
19 print stdout "ok 3\n";
20 exec 'echo', 'ok 4';
21}