in reply to Using IPC::Open3 instead of backtick operator
The core module IO::Pipe is easy to use and works on both Linux and MS Windows. However, it doesn't handle STDERR.
The reader and writer methods expect a program to run and a list of arguments. The shell is not used.
#!perl use strict; use warnings; use IO::Pipe; my $pipe = IO::Pipe->new(); $pipe->reader(qw(ls -l)); while(<$pipe>) { ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using IPC::Open3 instead of backtick operator
by ikegami (Patriarch) on Jun 10, 2016 at 15:57 UTC | |
by RonW (Parson) on Jun 10, 2016 at 17:39 UTC |