| [reply] |
I have added the strict pragma, then ran script and it did mention the two arrays i then declared them and now no errors, now it just doesnt display anything but a blank web page.
When i check the source of the page i get
<HTML>
<BODY>
</BODY>
</HTML>
| [reply] |
You're not listening. You're not PUTTING anything in the @row array, you're only putting things in the @results array. You're printing an EMPTY array.
_____________________________________________________
Jeff japhy Pinyan,
P.L., P.M., P.O.D, X.S.:
Perl,
regex,
and perl
hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart
| [reply] |
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?
| [reply] |
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.
| [reply] |