Reply To: Looping Through Lines of a File in Tcl

› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › Looping Through Lines of a File in Tcl › Reply To: Looping Through Lines of a File in Tcl

#59843

Found this on the web. Seems to work.

Code:

set f [open test.txt r]

while {[gets $f line] != -1} {
   puts $line
}

-- Max Drown (Infor)