Tcl examples


A list of examples for those Beginning Tcl

See Also

a site dedicated to comparing programming languages. DKF has been tirelessly adding Tcl examples
Example fragments of Tcl source
examples collected by CL


The Tcler's Wiki is full of Tcl examples, but here's a subjective selection of short scripts that illustrate a point, so may be helpful for learners. All these are for a pure tclsh - see also Tk examples for wish scripts.

Please help arrange this from simple to complex!

Show me an example
"Hello world" from one-liner to MFClike GUI
Example scripts everybody should have
grep,find... in Tcl
An HTTP robot in Tcl
automated data mining, e.g. zipcodes
owh - a fileless tclsh
pass scriptlets on command line
A simple database
use an array and its powerful features