Read a text file into a string:
proc readfile filename { set fp [open $filename] set res [read $fp [file size $filename]] close $fp set res }
Touch a file: without modifying the contents, change a file's access time to (now); create it if it doesn't exist, with 0 bytes contents:
proc touch filename { close [open $filename a] } ;# after Don Porter in c.l.t, brought here by RS