Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^4: Using IPC::Open3 instead of backtick operator

by ikegami (Patriarch)
on Jun 10, 2016 at 18:18 UTC ( [id://1165336]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Using IPC::Open3 instead of backtick operator
in thread Using IPC::Open3 instead of backtick operator

use strict; use warnings; use IPC::Cmd qw( run ); my $tool = 'tar'; my $cmd = [ 'perl', '-e', 'warn "TEST FAILED IF YOU SEE THIS\n"' ]; my $buffer = ''; my @out = run( command => $cmd, buffer => \$buffer, verbose => 1 );
$ perl z.pl Running [perl -e warn "TEST FAILED IF YOU SEE THIS\n"]... TEST FAILED IF YOU SEE THIS

However, one simply has to remove verbose => 1 to make this a solution.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1165336]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-19 20:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found