in reply to Confused about "unitialized value" warning

Basically, it means that one of the variables that you use in that line contains no data. But as to which of them it is, we'd need to see more of the code.

Try printing them all out, one at a time, before that line.

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

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

  • Comment on Re: Confused about "unitialized value" warning

Replies are listed 'Best First'.
Re^2: Confused about "unitialized value" warning
by xspikx (Acolyte) on Aug 18, 2004 at 16:16 UTC

    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

      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