Jon Ericson wrote:
> I had considered this, but I don't want Yet Another Quote-like Operator
> (YAQO). Perhaps I should just change this RFC to call for a built-in
> tee operator:
>
> push @lines, tee($_) for <>;
>
I would vote strongly against a built-in "tee" operator.
You can achieve the same effect by tying a filehandle to an
object which tees output. Consider this hypothetical Perl5
snippet:
use IO::Tee;
my $OUT = IO::Tee->new(\*STDERR, "|logger", ">>my.log");
print $OUT "Hello, nurse!\n";
And if you hate OO syntax, it could export a "tee" function
which would do the construction but be less ugly to look at:
my $OUT = tee(\*STDERR, "|logger", ">>my.log");
I would really like to avoid adding more special operators
when their functionality is not really primitive.
--
___ _ _ _ _ ___ _
/ _ \| '_| | | |/ _ ' / Eryq (Erik Dorfman)
| __/| | | |_| | |_| | President, ZeeGee Software Inc.
\___||_| \__, |\__, |___/\ http://www.zeegee.com
|___/ |______/ [EMAIL PROTECTED]