Read a file one line at a time,
as opposed to reading the entire file at once.



Related tasks

 Read a file character by character
 Input loop.


set f [open "foobar.txt"]
while {[gets $f line] >= 0} {
    # This loops over every line
    puts ">>$line<<"
}
close $f