[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Redirecting Output



I am stuck trying to use a web page as something like a control interface
for a series of file maintenance scripts that I have created in MacPerl.
These basically loop thru text files stored in one folder, process them in
one way or another, and write the new versions out to another folder from
which they can be accessed via normal browser links. I know how to use
select() to direct the output to these new files, but how do I periodically
switch STDOUT back to the user's browser so that some kind of status
indicator can be displayed (e.g., "Now processing file My_File.html")? I
would also like to write to a log file and conclude the exercise by dumping
the log contents back into the browser.

So, the question is once you've redirected output to a new file, how do you
switch it back to the original STDOUT target? My first guess is that you
would capture the state of STDOUT to a variable to begin with and then use
something like select($original_state), but I'm not at all clear on this.
Thanks.

Richard Gordon
Gordon Consulting & Design
Voice: 770-565-8267  Fax: 770-971-6887



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch