Harry Putnam <[EMAIL PROTECTED]> writes:
> cat io.pl
> #!/usr/local/bin/perl -w
>
> use IO::Tee;
>
> open($handle1, "file1") or die("No!");
> open($handle2, "echo") or die("No2!");
>
> $tee = IO::Tee->new($handle1, $handle2);
>
> print $tee "Hello world!";
Note that the original example from perldoc IO::Tee
has no opens in it:
use IO::Tee;
$tee = IO::Tee->new($handle1, $handle2);
print $tee "foo", "bar";
my $input = <$tee>;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>