in reply to Re: How do I redirect outut from system () to a file and also to screen
in thread How do I redirect outut from system () to a file and also to screen
The backticks work fine!! Thanks for your help.
use IO::Tee;
my $tee = IO::Tee -> new(">stdout.log", \*STDOUT);
my $clrout = `cleartool describe lbtype:MYLABEL`;
print $tee "\n$clrout also prints to screen and redirects to file!\n";
print $tee "\nThis will print to screen and redirects to file!\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How do I redirect outut from system () to a file and also to screen
by ivancho (Hermit) on May 25, 2005 at 01:23 UTC |