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

Re: [MacPerl] opening and writing to multiple filehandles



At 03.26 +0200 98-09-07, Fred Terry wrote:
>I have an sgml file that I am processing with a perl script. The
>file contains information that needs to be written out to two
>separate files. While the script runs, it reads the output from
>an sgml parser and writes the output to either file1 or file2 and
>sometimes to both.

open(ONE, ">file1");
opwn(TWO, ">file2");
print ONE "blah blah blah\n";
print TWO "yada yada yada\n";
close ONE;
close TWO;


___Carl_Johan_Berglund_________________________
   Adverb Information
   carl.johan.berglund@adverb.se
   http://www.adverb.se/



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