in reply to redirect STDERR to my log file, also funny *FOO notation.
Works fine for me.# Get filename components ($filename, $filedir, $filext) = fileparse($0, '\..*'); # Create filename; note the ./log sub-dir $logfile = "${filedir}log/$filename.log"; # Redirect STDOUT & STDERR to named logfile open( STDOUT, ">>$logfile") or die "\nUnable to open STDOUT -> $logfile: $!\n +"; open( STDERR, ">>&STDOUT"); # Set autoflush on select (STDERR); $| = 1; select (STDOUT); $| = 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: redirect STDERR to my log file, also funny *FOO notation.
by JohnMG (Beadle) on Nov 15, 2005 at 15:48 UTC | |
by OfficeLinebacker (Chaplain) on May 20, 2006 at 06:15 UTC |