in reply to duplicating STDERR to a logfile...
open(STDERR,"|tee somefile 1>&2"); print STDERR "this goes to STDERR and somefile\n"; [download]