Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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


In reply to Re: Using IPC::Open3 instead of backtick operator (updated) by haukex
in thread Using IPC::Open3 instead of backtick operator by rcrews

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-19 05:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found