This is a good idea. Windows systems don't have tee, I hacked in this tee.pl awhile ago for my Windoze work. It is a simple program. The only tricky part is turning auto-flush on for write. Have fun to anybody who needs it.
#!/usr/bin/perl -w
use strict;
# tee program #### tee.pl ######
# quickie tool
$| =1; #flushes I/O for each write.
sub usage
{
print "TEE USAGE:\n tees stdout to a file and to stdout\n".
" program | tee outfile\n";
}
my $filename = shift @ARGV;
usage unless $filename;
open (OUTFILE, '>', "$filename") or (die "Can't open OUTFILE: $!");
while (<>)
{
print;
print OUTFILE;
}