newbie - Output to multiple Filehandles
From: Jeremy Phillips (jeremy.phillips_at_pfizer.com)
Date: 05/24/04
- Previous message: JDS: "Re: Cannot launch simple applications (notepad, java) using Apache and PERL(CGI)"
- Next in thread: Jürgen Exner: "Re: newbie - Output to multiple Filehandles"
- Reply: Jürgen Exner: "Re: newbie - Output to multiple Filehandles"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 24 May 2004 08:38:50 -0700
Hi,
I am writing one of my first perl scripts and would like to send
output to a logfile and stdout simultaneously. In addition, I'd like
to be able to specify that some output only be sent to STDOUT or only
to the logfile.
Currently, I am using the following to print to stdout and the logfile
simultaneously.
open(STDOUT, "| tee -a $logFileName");
To print only to the logfile, I create a filehandle for it in the
usual sense
open(LOGFILE, ">>$logFileName");
The problem is that I have no way of specifying output to only
standard output, leaving the logfile alone. Can anyone tell me how to
do this? I would greatly appreciate any help.
Thanks,
Jeremy
- Previous message: JDS: "Re: Cannot launch simple applications (notepad, java) using Apache and PERL(CGI)"
- Next in thread: Jürgen Exner: "Re: newbie - Output to multiple Filehandles"
- Reply: Jürgen Exner: "Re: newbie - Output to multiple Filehandles"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|