##
#!/usr/bin/perl -w
# Program: captpipe
my $arg = "hi there";
print ("Going to call another perl program and capture it's output\n");
open (PIPE,"printsth $arg | ") or die $!;
while () {
print;
}
## ##
[sk]% captpipe
Going to call another perl program and capture it's output
hi there
hi there
hi there
hi there
hi there
hi there
hi there
hi there
hi there
hi there