in reply to Re^3: IPC::Cmd pipe array
in thread IPC::Cmd pipe array

#!/usr/bin/env perl use strict; use warnings; use Data::Dumper; use IPC::Run qw/run/; use IPC::Run qw(run); my @in = ("Test foo", "Test bar"); run [echo => -n => @in] , '|', [ sed => "s/(foo|bar)/pass/" ], '>', \m +y $out; print "Redir: " . Dumper($out);

OUT:

% ./t2.pl Redir: $VAR1 = 'Test foo Test bar';