1: ### 2: ## read_file <file> 3: ## Read the entire contents of a file and return it as a string. 4: ## 5: ## file - Name of the file to read. 6: ### 7: 8: proc read_file {file} { 9: set fp [open $file] 10: set x [read $fp] 11: close $fp 12: return $x 13: } |