in reply to Re: Confused about "unitialized value" warning
in thread Confused about "unitialized value" warning

This is where I create my "matrix" variable. I presume this is where the problem comes from:

while( my @row1 = $query1->fetchrow_array()) { push(@matrix, [@row1]); $count ++; }

Then I have a while loop

$ab=0; while ( $ab < $count) { if ( $matrix[$ab][0] == $row[2]) { if (1000 <= $total_packages) { push(@MASTER, $row[0].":".$row[1].":$matrix[$ab][3]:".$tot +al_packages.":AI"); last SWITCH; } } $ab ++; }

20040818 Janitored by Corion: Added formatting

Replies are listed 'Best First'.
Re^3: Confused about "unitialized value" warning
by davorg (Chancellor) on Aug 18, 2004 at 16:21 UTC

    You code isn't exactly easy to follow (we have <code> tags you know), but is it possible that some of the data you get back from DBI can contain NULLs? There would translate to Perl "undef" values.

    --
    <http://www.dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg