For opening the file set resultfile [open result.txt a]
The a option will open it in append mode. set string "" append string $x " " $y puts $resultfile $string -- View this message in context: http://network-simulator-ns-2.7690.n7.nabble.com/extract-values-from-main-tcl-file-output-file-to-graph-it-tp28243p28249.html Sent from the ns-users mailing list archive at Nabble.com.