in reply to How to read from shell command and terminate it afterwards?
Why other people are making such a meal of this I do not know. Here's the easy way:
my $pid = open PIPE, "theCommand arg1 arg2 |" or die $!; my @input = map scalar <PIPE>, 1 .. 4; ## kill 3, $pid;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to read from shell command and terminate it afterwards?
by ikegami (Patriarch) on Feb 10, 2012 at 09:36 UTC | |
by BrowserUk (Patriarch) on Feb 10, 2012 at 09:56 UTC | |
by ikegami (Patriarch) on Feb 11, 2012 at 02:31 UTC | |
by chessgui (Scribe) on Feb 10, 2012 at 10:02 UTC |