|No such thing as a small change|
use strict seems to hose my codeby aeshirey (Initiate)
|on Apr 24, 2002 at 20:07 UTC||Need Help??|
aeshirey has asked for the
wisdom of the Perl Monks concerning the following question:
I'm working on a CGI program that is currently of a decent length (almost 700 lines). Until recently, I did not have "use strict," (I'm a novice) so I decided to implement it and run through my code, making sure all variables had "my" and proper scope.
After eliminating all errors (by the way, I do use the -w option), my code *says* it runs fine, but at least one hash doesn't get values from the form(s) I use. I've found that when I initialize my %INPUT for my form, all values are null, even though they previously worked fine before the use strict implementation. In my block that gets STDIN and puts into $buffer, I try to print each key and value as it's put into the hash, but my program won't print them. In fact, it won't print ANYTHING, even hard-coded text.
Also, I've tried removing the "my %INPUT;" line and "undoing" some of the strict coding to (hopefully) allow it to temporarily work so I can figure out what went wrong and where. Unfortunately, this doesn't bring back my %INPUT, and I'm pretty much dead in the water.
No compiler errors/warnings, no way to tell why it's not working. I've searched elsewhere, but found no answer. Does anyone have any insight as to why my hashes aren't working?