Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Need suggestion for selecting IPC::Open3 or backticks

by kennethk (Abbot)
on Nov 12, 2013 at 18:40 UTC ( #1062249=note: print w/replies, xml ) Need Help??

in reply to Need suggestion for selecting IPC::Open3 or backticks

There are a few questions you need to ask yourself w.r.t. what external call technology to pick (IPC::Open3, system, `STRING`, fork/exec...). What degree of control/sandboxing do you need to have over the process? What kinds of control do you want to have over STDOUT/STDERR? What do you want/need to do with exit codes? I personally almost always use fork and exec, because then I can implement timeouts pretty easily.

Also, since you are working with tar, you may consider using Archive::Tar(CORE module) instead of command-lining it. That might make your error-handling dramatically more straight-forward.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

  • Comment on Re: Need suggestion for selecting IPC::Open3 or backticks

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1062249]
[LanX]: due coretti, per favore! ;-)
[shmem]: grappa, ginebra o amaretto?
[shmem]: LanX: tried strange stuff wrt autocomplete. No luck :(
[erix]: sambuca
[LanX]: machiato!
shmem fills a glas with sambuca, drops 3 beans of coffee into it, lights the stuff and hands it to erix
[Your Mother]: Liquore Strega. :P
[shmem]: s/beans of coffee/enterprise beans/ :-P

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (12)
As of 2017-03-28 12:16 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (330 votes). Check out past polls.