title: reading file with "[" and manipulation each line TCL
body: <p>I have file with the below lines <strong>(file.list)</strong>:</p>
  
  <pre><code>insert_buffer [get_ports { port }] BUFF1 -new_net  net -new_cell cell
  </code></pre>
  
  <p>I'm reading the file with the below script <strong>(read.tcl)</strong>:</p>
  
  <pre><code>    #! /usr/local/bin/tclsh
  foreach arg $argv {
  
  set file [open $arg r]
  set data [ read $file ]
  
  foreach line  [ split $data "\n" ] {
  
  puts $line
  
  set name [lindex $line [expr [lsearch -all $line "-new_cell"]+1]]
  puts $name
  }
  
  close $file
  
  } 
  </code></pre>
  
  <p>while running the above script <strong>(read.tcl file.list)</strong> I get error since I have "[" in file.list and script think its a beginning of TCL command.</p>
  
  <pre><code>list element in braces followed by "]" instead of space
      while executing
  "lsearch -all $line "-new_cell""
      ("foreach" body line 5)
      invoked from within
  "foreach line  [ split $data "\n" ] {
  </code></pre>
  
  <p>How can I read the file correctly and overcome the <strong>"["</strong> symbol?</p>