11.4 Writing to files
You can write to a file with the puts command.
The syntax of a puts command is puts <channel> <text>.
The <channel> is the channel of the file you cought with the open command.
The <text> is what you want to write to the file.
A small example:
set fs [open $file w]
puts $fs "$nick"
This would write $nick to $file.