{ local *STDOUT; open STDOUT, '>>', "$logbin/$logname" or die $!; # ... }