in reply to interacting with background shell
If you need both to control both input and output, there's IPC::Open2 and IPC::Open3, but those require you to be very careful about deadlocks.open CMD,"|/some/command >/dev/null" or die "Can't fork command: $!"; # ... print CMD "line of input\n"; # ... close CMD;
Some people like the Expect module. Never used it myself, though.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: interacting with background shell
by GuidoFubini (Acolyte) on Jun 14, 2006 at 18:38 UTC |