in reply to Suppressing console output
my $mySTDOUT = (); my $oldSTDOUT = (); *oldSTDOUT = *STDOUT; *STDOUT = *mySTDOUT; my $test = 'this is a test'; print "$test\n";
After you run this, you should get NO output from that print command. So you'd want do to this in script A. Then, if you ever wanna restore STDOUT so you see it's output again, you can do this...
*STDOUT = *oldSTDOUT;
Hope that helps.
-Lunchy
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Suppressing console output
by Tanktalus (Canon) on Sep 16, 2005 at 19:30 UTC | |
by Lunchy (Sexton) on Sep 16, 2005 at 20:02 UTC |