Capture output but suppress it to screen
Posted on 2003-03-09
Using perl with cygwin, i want to run an executable and capture its output but supress what is normally viewed in the console.
Say I run a dos box and type "program.exe" and the screen outputs:
how are you
What I want is to run "perl.exe test.pl" with the following script
print "this is all that should show on screen"
and somehow supress the normal "hello how are you" output from showing on the screen.
I'll raise points if this proves to be more complicated.