Guest wer Code (perl): (dl ) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #!/usr/bin/perl use strict; use warnings; use IO::Tee; my $tee_file="stdout.txt"; my $tee=new IO::Tee('>&STDOUT', ">$tee_file"); close(STDOUT); *STDOUT = $tee; print "Test1\n"; print "Test2\n"; print "Test3\n"; print "Test4\n";
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/usr/bin/perl use strict; use warnings; use IO::Tee; my $tee_file="stdout.txt"; my $tee=new IO::Tee('>&STDOUT', ">$tee_file"); close(STDOUT); *STDOUT = $tee; print "Test1\n"; print "Test2\n"; print "Test3\n"; print "Test4\n";
select(STDOUT)