open(FILE,"run_tool -f "test.tcl" 2>&1|"); open(LOG,">log"); while(){ print; print log; }