Hi Joseph. R. Joseph Newton wrote: > > Jonathan Mangin wrote: > > > > Jeez, this is a beginner's list? Y'all are defining my > > ignorance of this here purrl stuff. I hope someone with > > patience can help me out. In a simple login/registration > > program using 5.6.1... > > > > #!/usr/bin/perl -wT > > use strict; > > Something is screwy here ... > > > [CGI and DBI stuff] > > > > $countryid="1"; > > Where did this come from if you are using strict? Unless you > declared $countryid elsewhere [not a good idea], you should > have received an error on this line.
As a beginner it's difficult to know what of your code is relevant to the question and what's not. Perl suffers from being programmed as if it were C, C++, or shell script instead of what it actually is. This looks like C programming to me, where all the variables are declared at the beginning of the file and then forgotten about. Whatever, since there's a 'use strict' in there there can be no mistyped identifiers and the code is unambiguous at this point: '$countryid' must have been declared and now has the value '1' (albeit a string). > Note: You can, and really should, have whitespace between > binary operators and their operands. You gain no efficiency > by torturing your eyes unnecessarily. This is a good place to mention perldoc perlstyle which is as good a set of layout rules as any. > Please repost with more context, particularly showing the > declarations of te variables used. The problem seems to be a misunderstanding of both references and declarations. Feedback from Jonathan will hopefully tell us! Cheers, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]