|Problems? Is your data what you think it is?
CGI inconsistenciesby arrow (Friar)
|on Apr 07, 2003 at 02:01 UTC
arrow has asked for the wisdom of the Perl Monks concerning the following question:
I work with CGI on the internet, and lately I've been noticing my scripts doing weird things. One of these inconsistencies is a variable containing the year is set near the top of the script, and printed near the bottom. But there is not value in the variable when it is printed, it's just empty. I've checked the scope and it seems to lose its value at the end of the enclosing foreach block, but it was declared earlier as a universal variable. I wouldn't be so miffed about this if it had always done this, but before this, it had worked perfectly for a least a month, then one day it broke, then the next day it worked again! Is this a problem with my scripts (I can't imagine what) or with the server (it's a free british server)? Or is it my connection, which is dial-up (I know, I know). Any help would be greatly appreciated.