Column value NULL is returned as undef.  In some databases, that includes
empty strings.  This snippet before the print should remove that problem:

   foreach ( @$aref ) { $_ = '' if ! defined $_; }
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
----- Original Message -----
From: "Tim Harsch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 09, 2001 10:00
Subject: uninitialized value and fetchro_arrayref


> Hello,
> I have a bit of code like this:
>
> while( $aref = $sth->fetchrow_arrayref ) {
> # Output format  should be
> # Clone ID Collection Plate Row Col cdna_libr_id speciesGBACC
> print join( "\t", @$aref ), "\t";
> }
>
> Out of 4,856,442 iterations I get 13 of these warnings:
> Use of uninitialized value at get_cumulative_plates line 81.
>
> line 81 is the print/join line.  How can it be possible that that line
> would give that error?  In order to get into the loop $aref has to be
> assigned to...
>
> Is there anyway that fetchrow_arrayref could be the cause of it?


Reply via email to