The cgi.tcl Package
The cgilib.tcl file included with this book just barely scratches the surface of things you might like to do in a CGI script. Don Libes has created a comprehensive package for CGI scripts known as cgi.tcl. You can find it on the web at
One of Don's goals in cgi.tcl was to eliminate the need to directly write any HTML markup at all. Instead, he has defined a whole suite of Tcl commands similar to the P and H2 procedures shown in this chapter that automatically emit the matching close tags. He also has support procedures to deal with browser cookies, page redirects, and other CGI features.