TCL - Part 2
Lists (Continued) Appending to lists is simple with lappend: Note: lappend takes just the name of the list. It updates the specified list, so you do not have to use set. % set list {this is {a list}} this is {a list} % lappend list {more stuff here} this is {a list} {more stuff here} % % puts $list this is {a list} {more stuff here} Inserting into a list is done with linsert. It is zero-indexed: % set list [linsert $list 3 {of stuff with}] this is {a list} {of stuff with} {more stuff here} % % puts $list this is {a list} {of stuff with} {more stuff here} % Split split accepts: ...