daisy4u721
Programmer
I have a quick tcl question, hope someone can help.
I have 2 files and Im trying to get the information in the second file to the first file. I wrote a code but it doesnt seem to work. This is the code below.
When i open the outfile, i find "?? ??" in there.
am i doing anything wrong? any help will be appreciated.
I have 2 files and Im trying to get the information in the second file to the first file. I wrote a code but it doesnt seem to work. This is the code below.
Code:
set infile [open "daisy.doc" r]
set outfile [open "daisy2.doc" w]
while {![eof $infile]} {
set line [gets $infile]
puts $outfile $line
}
When i open the outfile, i find "?? ??" in there.
am i doing anything wrong? any help will be appreciated.