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.