If the
shell redirection method isn't suitable (eg, running in a CGI script, or envoked in some other way you can't control), there are other options.
- open(STDERR, '>>', $filename) or die "can't open log $filename: $!"
- PerlIO::Util or PerlIO::tee to copy, like STDERR->push_layer(tee => \$filehandle);