Thread Ausgabe auf Konsole und gleichzeitg in Datei
(12 answers)
Opened by hansi66 at 2010-12-17 12:28 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"; Last edited: 2010-12-17 13:03:17 +0100 (CET) |