BTW the file is opened outside (and before) the proc is called.
Thanks,
Ron
Is it really? Try puts [file channels] to verify.
--
Jeff Hobbs, The Tcl Guy
http://www.ActiveState.com/, a division of Sophos
SOLUTION:
as usual the last 1% takes 99% of the effort.
A proc is called from the main line code in which a data file is opened
for reading within the proc. Within the proc the proc is re-invoked as
the last command using an after command. Because the file was closed
following the initial invocation in the main line code, this prevented
file4 channel from being found. Hence, remember that even though the
proc is recalled recursively from within itself, the first invocation
returns to the main line code and closed the file. Subsequent proc
invocations scheduled by the after command find a gets without a file
handle. Ta Daaaa!
Ron
Sounds like the `fileevent' command could be useful here instead of
`after'?
HTH
R'