Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I must have written 20 different routines in 12 years to run a system command. Most of them are pretty standard, they spawn a command, then analyze both $? and $!, and if $? has a value, analyze it to find what happened. Maybe handles some I/O redirection, using callbacks if we're fancy.

It's just one of the lame things my coworkers and I have to confess to. Despite the sheer number of times we all do this, we've never put it in one central location. Time to fix that mistake

So I'm formalizing something for us. I've looked a little at using IPC::Run as a base, but I'm wondering if anyone has a tutorial for it? It's documentation is extensive, but the module is so vast, i would learn better with good examples

The other questions would be:

  • What is your solution? What is your common code for running a system command
  • Have you used IPC::Run? What was your experience?
  • If you don't use it, is there another good module you've learned to love?

Thanks Brothers!


In reply to Complete solution for system commands? by HuckinFappy

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?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2023-10-04 16:17 GMT
Find Nodes?
    Voting Booth?

    No recent polls found