omfg.. yours is the funniest post i've seen in a long time..
It's because @row is not being declared.. that is.. it's not being told 'row exists in this area of the program'.
keep using strict! Trust the strict- Strict is good- Strict is your friend. It's your girlfriend who loves you but won't put up with any of your 5h1+.
If she whines and complains.. it means you need to stop that- or your code 'looks' like it's working.. but it's *not*.
Like moritz suggested, this should work:
while ( my @row = $sth->fetchrow_array ) { print "@row\n"; }
Again, what is happening is that you don't say anywhere 'my @row'.
You could also have done this.. (althought bad form and possibly buggy):
updateikegami suggests these snipplets are essentially the same, and that the second is not bad form or possibly buggy. And it was the # on strict that cracked me up. It's like when my two year old goges 'mommy i'm hot' so she pours a glass of cold organge juice all over herself and says 'now everything is great!'- that it's funny doesn't mean you have ill feelings for the situation.
In reply to Re: "use strict" and undeclared variables
by leocharre
in thread "use strict" and undeclared variables
by padawan_linuxero
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |