Posted to tcl by kostix at Sat Aug 16 13:47:18 GMT 2008view pretty

C:\tmp>type dchan.tcl
set filename out.log
close stdout
open $filename w+
close stderr
open $filename w+

puts "from STDIN"
puts stderr "from STDERR"


C:\tmp>tclsh85 dchan.tcl

C:\tmp>type out.log
from STDIN


C:\tmp>