there is a missing proces replacevar 
 
 
proc replacevar {strin what withwhat} { 
 
  set output $strin 
  set replacement $withwhat 
  set cutpos 0 
  while { [string first $what $output] != -1 } { 
    set cutstart [expr [string first $what $output] - 1] 
    set cutstop  [expr $cutstart + [string length $what] + 1] 
    set output [string range $output 0 $cutstart]$replacement[string range $output $cutstop end] 
  } 
  return $output 
}
		 
		
		
		
		
		
		
		
	 |