- for_file var filename code
Here's how to redo it in pure-Tcl:
proc for_file {varName filename body} { upvar 1 $varName var set fp [open $filename] while {[gets $fp var]>=0} { uplevel 1 $body } close $fp } ;#break and continue support would need some extra action, compare do...until in Tcl.