( ( perl foo.pl | tee -a output.log ) 3>&1 1>&2 2>&3 3>&- | tee -a error.log ) 3>&1 1>&2 2>&3 3>&-