flippy has asked for the wisdom of the Perl Monks concerning the following question:
This should be so simple, but I'm really struggling...
I have an install script (win2000) which asks a few questions, runs a few system() commands, produces output to stdout and stderr. I need everything that's printed to the screen to also go to a single file, retaining the order it's generated.
doing
perl scriptname.pl >outfileredirects ALL output to the file, meaning my "where do you want to install this?" question isn't printed, thus the user has no idea what he's being asked.
Think I need something like UNIX's tee function, or even some software which captures everything in a DOS box.
Of course, the reason I'm here is that a pure Perl solution would be ideal. I can redirect STDOUT and STDERR to a file easily, but need to keep it all going to screen as well!
TIA
|
|---|