Evaluated proc 2dsetchar {f e x y} { set fsize [2dsize $f]; set out [split $f \n]; set new [string replace [pad_line [lindex $out $y] [lindex $fsize 1]] $x $x $e]; join [lreplace $out $y $y $new] \n}