I tried the below but the output file was not created. The Perl script has

open(STDOUT,"> NUL:);
open(STDERR,"> NUL:);
open(F,"> CON:);

select(F);$|=1;

.....


Should the code below be above or inside the "open"?

Also, what does the line "select(F)..." do?


 > You want to use something called tee.
 >
 > The following
 > will open a pipe to $maxentpath (maxent is a binary I am piping commands
 > to from perl). The output from maxent will then be "tee'd" into the file
 > maxtemp.dat and to the standard output.......
 > use FileHandle;
 >
 > $maxentpath = "maxent";
 > $maxent = new FileHandle("| $maxentpath|tee maxtemp.dat");
 >
 > "Man tee" yields the following:
 > NAME
 > tee - Displays the output of a program and copies it into a file
 > SYNOPSIS
 > tee [-ai] file...
 >
 >
 > etc..etc..etc....
 >
 > This of course assumes you are a *nix person.
 > A.

On Tue, 11 Jun 2002, phumes1 wrote:
 > Hi,
 >
 > I have a Perl script that I need to modify. Presently, its outputting the
 > results to the screen. Is there a way to also
 > output the same to a file?
 >
 >
 >
 > 
+-----------------------------------------------------------------------------------+ 

 >
 > Philip Humeniuk
 > [EMAIL PROTECTED]
 > [EMAIL PROTECTED]
 > 
+------------------------------------------------------------------------------------+ 

 >
 >



+-----------------------------------------------------------------------------------+ 

Philip Humeniuk
[EMAIL PROTECTED]
[EMAIL PROTECTED]
+------------------------------------------------------------------------------------+



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to