Tcl/Tk open and read file


  if { [catch {open $filn r }  f ] } {
    Report 3 "Could not open initialisation file $filn"
    return 0
  }


  set textin [split [ read $f ] "\n"]
  CloseFile $f

原文地址:https://www.cnblogs.com/greencolor/p/2004832.html