in reply to Getting user input with STDOUT tee to file

I call the STDERR suggestion, and raise with /dev/tty prompting and user input (remember zap the process zapper :) ?).

Seriously: Consider using yum -y to auto-answer-yes instead of prompting, esp. as you want to automate the installation anyway. For the general case, there's also the 'yes' command to provide simple input to obnoxious semi-interactive programs. For worse cases, there's expect and the corresponding Perl modules. To capture all input/output, there's also script for capturing a session transcript (albeit complete with _all_ of escape code sequences and curses(sic!)).

To dup STDERR onto STDOUT with 2>&1 and print it as part of Perl's STDOUT: print qx!yum ... 2>&1!. But I tend to dislike the implicit redirect of system (though it is honored e.g. on Linux).

One final note: a program can test whether a file descriptor is a tty and modify its behaviour accordingly (check perldoc -f -t and the -t operator).

cu
Peter