Declaring all your variables at the start of your code is a very self destructive habit.
Declare all your variables as lexically scoped in the smallest applicable lexical scope unless you have a positive reason to do otherwise. (Note: this has nothing specifically to do with Perl - it applies in all programming languages).
If you followed this advice you would have been much less likely to have made the mistake.
In reply to Re^5: Help with uni project: DBI errors in CGI script
by nobull
in thread Help with uni project: DBI errors in CGI script
by ginda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |