Re: [htdig] [off topic] -- how to reset STDOUT Assignment


Subject: Re: [htdig] [off topic] -- how to reset STDOUT Assignment
From: J. op den Brouw (msql@st.hhs.nl)
Date: Sun Nov 19 2000 - 09:30:04 PST


You should not do that. There is a nice function call in Perl
called select(). It can be used to reassign output to the
'screen' to a file. Something like this..

open(OUTPUT, somefile);
$old_fh = select(OUTPUT);
<do your stuff with htmerge>
select(($old_fh);
close(OUTPUT);

This is from 'The Perl Cookbook', page 224 at the bottom.
And read the perlfunc manual page

Greetz,

Sphboc@aol.com wrote:
>
> Have a Perl Script which invokes execution of htdig and htmerge. Similar
> purpose to rundig, but use of shell scripts, in the specific environment, is
> not practicable.
>
> I want to direct the STDOUT, from htdig/htmerge, to disk files. open
> (STDOUT,">diskfile"), followed by system commands to execute ht(dig/merge),
> send the STDOUT to the disk file.
>
> Trouble is, I can't re-assign STDOUT to its original value.
>
> open (STDOUT,">-") appears to lose the output entirely.
>
> If I close one disk file, and open another, any subsequent SYSOUT does go to
> the new disk file.
>
> I strongly suspect that some form of "dev/xxxx" is needed; how can I find the
> value (under Linux 6.1).
>
> Steven P Haver/602-242-9708
>
> ------------------------------------
> To unsubscribe from the htdig mailing list, send a message to
> htdig-unsubscribe@htdig.org
> You will receive a message to confirm this.
> List archives: <http://www.htdig.org/mail/menu.html>
> FAQ: <http://www.htdig.org/FAQ.html>

------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig-unsubscribe@htdig.org
You will receive a message to confirm this.
List archives: <http://www.htdig.org/mail/menu.html>
FAQ: <http://www.htdig.org/FAQ.html>



This archive was generated by hypermail 2b28 : Sun Nov 19 2000 - 09:31:45 PST