Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: How to use undef in DBI sql query result collection

by rdfield (Priest)
on Feb 17, 2005 at 14:36 UTC ( #431955=note: print w/ replies, xml ) Need Help??


in reply to How to use undef in DBI sql query result collection

You're missing a my:

while (my @data = $sty->fetchrow_array()) {

rdfield


Comment on Re: How to use undef in DBI sql query result collection
Select or Download Code
Re^2: How to use undef in DBI sql query result collection
by dragonchild (Archbishop) on Feb 17, 2005 at 14:41 UTC
    You're missing a my:

    How do you know? Snippets were shown, not necessarily running code. Maybe @data is scoped higher than the while-loop for other reasons. Maybe strict isn't being used in this code for various reasons. (Did you know that CGI doesn't use strict?) There are a ton of completely legitimate reasons why a my may have been left out. Commenting upon it without actually helping out the OP is a complete waste of my time, for having to read your reply.

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://431955]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2014-12-22 09:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (114 votes), past polls