Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by rdfield (Priest)
on Feb 17, 2005 at 14:36 UTC ( [id://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

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://431955]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (7)
As of 2024-04-18 08:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found