title: How to match the variable in switch with contents of a list?
body: <p>I have a doubt concerning the use of switch in tcl. Mainly, I was wondering if it was possible to make something like:</p>
  
  <pre><code>switch myvar {
      list1 {
          puts "myvar matches contents of list1"; }
      list2 {
          puts "myvar matches contents of list2"; }
      default {
          puts "myvar doesn't match any content of any list"; }
  }
  </code></pre>
  
  <p>In here, list1 and list2 would be either a list or array of strings containing the names of different files.</p>
  
  <p>Is this even possible without making a very detailed regexp search?</p>
  
  <p>Thanks!</p>