Return to Snippet

Revision: 3458
at July 27, 2007 07:00 by micmath

Initial Code
$logfile = "/tmp/mylog.txt";
open STDOUT, ">>", $logfile or die "cannot append to '$logfile': $!\n";
open STDERR, ">&STDOUT" or die "cannot dup STDERR to STDOUT: $!\n";
select STDERR; $| = 1;
open LOG, ">&STDOUT" or die "cannot dup LOG to STDOUT: $!\n";
select LOG; $| = 1;
select STDOUT; $| = 1;

Initial URL

Initial Description

Initial Title
Redirect everything to log file.

Initial Tags

Initial Language