RE: create log as well as print on screen

2003-08-21 Thread Marcos . Rebelo
old_script.pl | perl -e "while (<>) {print $_; warn $_}" 2> $logFile Or redefine the print -Original Message- From: mark sony [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 3:11 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: create log as well as p

RE: create log as well as print on screen

2003-08-20 Thread Jonathan E. Hogue
G "THING\n"; close LOG; ( basically print twice for everything you print. -Original Message- From: mark sony [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 8:11 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: create log as well as print on screen Hi All,

Re: create log as well as print on screen

2003-08-20 Thread Kristofer Hoch
sub Log{ my $message = shift(); my $LOGNAME = 'log.log'; open(LOGFILE, ">>$LOGNAME") or die("Could not open log file: $!"); print LOGFILE $message; close(LOGFILE); } sub Print{ my message = shift(); #Assuming you are passing a string my $Out = *STDOUT; # Standard out. print $Out "

create log as well as print on screen

2003-08-20 Thread mark sony
Hi All, I wrote a script which is running perfectly fine providing many outputs on the screen . Only glitch is that it does not print in a log file . Now what I want is that it would print on the screen as well as create a log file . At the end of the program I will output that the above o