Tor Hildrum <[EMAIL PROTECTED]> writes:
> #!/usr/bin/perl
> 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!";
Well thats better than what I came up with but it dies here on the
first open.
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!";
Error:
$ ./io.pl
No! at ./io.pl line 5.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>