Listing 1. Tcl Script to Read Environment Variables

#!/usr/bin/tclsh
puts "Content-type: text/html \n\n"
puts "<title>Environment Variables, \
   ala Tcl</title>"
set mylist [array names env]
foreach foo $mylist {
   puts "Variable Name: env($foo) \
      Value: $env($foo) <br>"
}