use Sysadm::Install qw(tap); my($stdout, $stderr, $rc) = tap "/bin/ls", "-l", "foobar"; print "stdout=$stdout\n", "stderr=$stderr\n", "rc=$rc\n";