Posted to tcl by kbk at Thu Feb 11 16:42:54 GMT 2010view raw

  1. % foreach value {foo bar grill bar grill grill foo foo} {
  2. incr count($value)
  3. }
  4. % parray count
  5. count(bar) = 2
  6. count(foo) = 3
  7. count(grill) = 3