|
Hi,
Could anyone help me in redirecting the output and errors as well to a log_file.I wrote a simple script as below. Could anyone suggest me the best way to handle the errors and output of a perl script.
Thanks in advance.
#!perl
$S = "\\";
$log_file = "c:".$S."log_file";
$output_file = "c:".$S."output_file";
open STDERR,">$log_file";
open STDOUT, ">$output_file";
$status = system("cleartool ls");
close STDERR;
close STDOUT;
|
|
|
#!perl
$S = "\\";
$log_file = "c:".$S."log_file";
$output_file = "c:".$S."output_file";
open STDERR,">$log_file";
open STDOUT, ">$output_file";
$status = system("cleartool ls");
#Mimir writing here..
print STDERR $log_file;
print STDOUT $output_file;
#End of Mimir
close STDERR; close STDOUT;
=pod
Take a look at 1: http://www.hermanningjaldsson.com/1/pdg/pdg.html
|
|
|
|
|
|
|
|