open STDOUT, "|tee '$outfile'" or die ...