UUIDs (Universally Unique Identifier) or GUIDs (Globally Unique Identifier) are defined in this document: [http://www.webdav.org/specs/draft-leach-uuids-guids-01.txt] Windows provides an API for generating GUIDs and some extensions make use of this, but I needed a pure-Tcl UUID generator. So, I came up with this. This proc, by no means, conforms to the standards discussed in the above document, but it does produce unique identifiers that are good enough for me. :) proc uuid {} { ## Try and get a string unique to this host. set str [info hostname]$::tcl_platform(machine)$::tcl_platform(os) binary scan $str h* hex set uuid [format %2.2x [clock seconds]] append uuid -[string range [format %2.2x [clock clicks]] 0 3] append uuid -[string range [format %2.2x [clock clicks]] 2 5] append uuid -[string range [format %2.2x [clock clicks]] 4 end] append uuid -[string range $hex 0 11] return $uuid }