Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2015-07-07 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (85 votes), past polls