in reply to Re^3: Help with uni project: DBI errors in CGI script
in thread Help with uni project: DBI errors in CGI script

I used strict and it did give me the message regarding them two array variables, i declared them at start of code then ran teh code and now no errors but still not data be displayed in browser?
  • Comment on Re^4: Help with uni project: DBI errors in CGI script

Replies are listed 'Best First'.
Re^5: Help with uni project: DBI errors in CGI script
by nobull (Friar) on Mar 16, 2005 at 20:45 UTC
    How are you expecting any content to get into the array @row? There is nothing in your code that puts anything in there.

    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.