Version 2 of join

Updated 2002-01-29 09:35:15

http://www.purl.org/tcl/home/man/tcl8.4/TclCmd/join.htm

Join converts a Tcl list into a string. It glues together the elements of a list using a supplied character as element seperator. Default is a space.

RS A typical application is to process a text that consists of several lines:

 foreach line [split $input \n] {
    # do something with line, produce output
    lappend outlines $out
 }
 set result [join $outlines \n] 

Tcl syntax help - Arts and crafts of Tcl-Tk programming - Category Command