Help for this page

Select Code to Download


  1. or download this
    sub tee {
        my ($fh1,@output) = @_;
    ...
    
    open my $fh,">","thefile.txt" or die "horribly";
    tee ($fh,"What I wanted to say");
    
  2. or download this
    use IO::Tee;
    
    my $tee = new IO::Tee(\*STDOUT,">thefile.txt");
    print $tee "What I wanted to say";