codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  error and output redirection in perl  vej1lr at 12:11 on Tuesday, March 06, 2007
 

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;

  Re: error and output redirection in perl  mimir at 04:10 on Friday, March 09, 2007
 

#!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









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: import contacts of msn/yahoo
•  Re: can execute c program through perl?????
•  Re: play mp3 and avi in java
•  Re: error and output redirection in perl
•  Re: Help with writing a program
•  Re: Hi need help in time()Fn
•  hi there, a do while loop needs work
•  NEED HELP FAST! Navigation system, games programming arrays
•  Change background located in CSS file


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007