On 4/19/05, Ambikesh Chaurasia wrote: > Hi All, > > I am calling many "C" programs from my perl script. I want to log > output of each of these "C" programs in DIFFERENT log files as well as > I want to display this output to STDOUT. > > Please send me your sugesstion how to do this. > > Please note that I have already tried using > 1. IO::Tee: > In this case, I get handle to tee, but I am not able to redirect > the STDOUT to this handle. >
What do you mean "not able to redirect the STDOUT to this handle."? Why not? What error did you get? did you try reading "perldoc IO::Tee"? Here is a usage example, the part using IO::Tee was taken almost directly from the EXAMPLES section: ################# begin code use strict; use warnings; use IO::Tee; use IO::File; my @progs = qw(prog1 prog2); for my $program (@progs) { my $tee = new IO::Tee(\*STDOUT, new IO::File(">$program.log")); print $tee `$program`; } ################# end code HTH, -- Offer Kaye -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>