Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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()) {


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?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2016-10-27 15:08 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (365 votes). Check out past polls.