home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Practical Programming in Tcl & Tk (4th Edition)
/
TCLBOOK4.BIN
/
pc
/
exsource.old
/
10_5.tcl
< prev
next >
Wrap
Text File
|
2003-04-15
|
233b
|
15 lines
#
# Example 10-5
# The File_Process procedure applies a command to each line of a file.
#
proc File_Process {file callback} {
set in [open $file]
while {[gets $in line] >= 0} {
uplevel 1 $callback [list $line]
}
close $in
}