p15.tcl
#!usr/local/bin/tclsh
set var {1 2 3}
puts "output of concat: [concat $var {3 6}]"
puts "output of lappend: [lappend $var {3 6}]"
puts "output of append: [append $var {3 6}]"
set var {1 2 3}
puts "output of concat: [concat $var {3 6}]"
puts "output of lappend: [lappend $var {3 6}]"
puts "output of append: [append $var {3 6}]"
output:
:chmod 755 p15.tcl
:tclsh p15.tcl
output of concat: 1 2 3 3 6
output of lappend: {3 6}
output of append: {3 6}3 6