in reply to Confusion with two-way pipes
use strict; use IPC::Run qw( start finish ) ; my @cat = qw( cat ) ; # Create pipes for you to read / write (like IPC::Open2 & 3). my $h = start \@cat, '<pipe', \*IN, '>pipe', \*OUT, '2>pipe', \*ERR or die "cat returned $?" ; print IN "some input\n" ; close IN ; print <OUT>, <ERR> ; finish $h ;
|
|---|