open(TWO, "| /your/second/program") or die "Dead $1\n";
Now instead of printing to STDOUT, print to the filehandle you just made:
print TWO "data data data\n";
In your second program that data is read in as STDIN:
print while(<>);
will print out "data data data".
In reply to Re: Passing ouput between program
by perigeeV
in thread Passing ouput between program
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |