Take the 2-minute tour ×

How can I in perl make


only relay stderr, and not stdout. (xcodebuild has an enormous amount of verbosity that I want to get rid of, but when something goes wrong, I still want to know what it was)

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Redirect the standard output to /dev/null:

system("xcodebuild >/dev/null") == 0
  or warn "$0: xcodebuild exited " . ($? >> 8) . "\n";
share|improve this answer
add comment

system("xcodebuild >> /dev/null");

...assuming, of course, that you're getting all the stderr stuff with your current syscall mechanism. Otherwise, you'll need to redirect stdout to devnull and stderr to stdout.

share|improve this answer
add comment

Your Answer


