in reply to Question regarding CGI and cookies
I'd like to note that the textbook author's code is a poor example for code. Typically you'd want to declare your variables at the moment they become relevant. This limits the scope where a variable is visible and promotes the ability to refactor your code.