Clovertech
› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › Looping Through Lines of a File in Tcl
In perl you can easily loop through lines of a file like this …
while () {
or even …
while (<>) {
Is there a way to do this in Tcl?
-- Max Drown (Infor)
Found this on the web. Seems to work.
set f [open test.txt r]
while {[gets $f line] != -1} { puts $line }