This approach (using open vs system) has the added advantage of allowing for concurrency. If you want to run N commands simultaneously, and report errors on those that timeout, this is easy to do. You can use select on all the open filehandles to catch when they output/complete.