What is the canonical way to pass a list to a Tcl procedure?
I\'d really like it if I could get it so that a list is automatically expanded into a variable number of arg
To expand on RHSeeger's answer, you would code myprocedure with the special args argument like this:
args
proc myprocedure {opt1 opt2 args} { puts "opt1=$opt1" puts "opt2=$opt2" puts "args=[list $args]" ;# just use [list] for output formatting puts "args has [llength $args] elements" }