---------- Forwarded message ----------
Date: Tue, 11 Jun 2002 13:26:13 +0100 (BST)
From: Alan John Drew <[EMAIL PROTECTED]>
To: phumes1 <[EMAIL PROTECTED]>
Subject: Re: Outputting to screen and file.
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]
>
>+------------------------------------------------------------------------------------+
>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]