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

[MacPerl] Any way to Tee in MacPerl?



According to Wade Williams:
> 
> I'm writing a program that's eventually going to end up on UNIX and I need
> to write to two files (STDOUT and a file) simultaneously.
<snip>

The solution presented (the subroutine) should work ok.
You do not even have to pass in the FILE1 and FILE2 as long
as you create them in the main program.  This is because
those variables are global to all other programs.
Actually, now that I think about it, if you don't put the
words LOCAL or MY in front of a variable in a subprogram it
automatically becomes globally defined.  So you could
create FILE1 and FILE2 anywhere you want and they would be
usable by the subroutine.

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