pschoonveld has asked for the wisdom of the Perl Monks concerning the following question:
Gladly, perl comes with IPC::Open2, which allows you to direct the STDIN and STDOUT of an executed program and let your script control them. But, for some reason my code isn't working. Here is is:
Prints nothing. Any thoughts?#!/usr/bin/perl use IPC::Open2; print open2(\*BOIN, \*BOOUT, "cat"); print BOIN "proclist\n"; print BOIN "quit\n"; close BOIN; while (<BOOUT>) { print; } close BOOUT;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: IPC::Open2
by btrott (Parson) on May 19, 2000 at 21:48 UTC | |
|
Re: IPC::Open2
by pschoonveld (Pilgrim) on May 19, 2000 at 21:53 UTC |