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>) { ... }
In reply to Re: Using IPC::Open3 instead of backtick operator
by RonW
in thread Using IPC::Open3 instead of backtick operator
by rcrews
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |