Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Using IPC::Open3 instead of backtick operator (updated)

by haukex (Archbishop)
on Jun 09, 2016 at 06:44 UTC ( [id://1165204]=note: print w/replies, xml ) Need Help??


in reply to Using IPC::Open3 instead of backtick operator

Hi rcrews,

I personally wouldn't use IPC::Open3, as there's a huge list of CPAN modules to make your life easier, see for example the "See Also" section of Capture::Tiny. A while back I did some research on all of them, and my personal favorite is IPC::Run3: Runs on *NIX and Windows, has excellent test scores, very few dependencies, it captures STDERR too, and it allows you to avoid the shell (which avoids whitespace and interpolation issues). Two things it can't do is timeouts and interactive communication with the subprocess, but I've rarely needed those. For those, IPC::Run seems like a good solution. And Capture::Tiny is also an excellent module, it's useful if you also want to capture the output of the Perl process itself. Update: IPC::System::Simple, which the AM also mentioned, is also nice in that it provides drop-in replacements for system and qx with much better error handling (it's what autodie uses when you say use autodie qw/system/;).

Hope this helps,
-- Hauke D

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-03-19 06:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found