I need to tee STDOUT to both STDOUT and a variable. For tee'ing to
STDOUT and a LOGFILE, I've used the older package described at
http://jenda.krynicky.cz/perl/TeeOutput.pm.html for some time and this
works wonderfully. I'm not getting a variable to work and
perhaps its because of a misunderstanding that I have.
#! /usr/local/bin/perl -w
use strict;
use Local::TeeOutput;
my $stdout;
open (TEST, '>', \$stdout);
openTee(*STDOUT, *STDOUT, *TEST);
print "Test line to STDOUT\n";
closeTee(*STDOUT);
print "Variable: $stdout\n";
_______________________________________________
Perl-Unix-Users mailing list
Perl-Unix-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs