[Chicago-talk] undef values in arrays.
Michael Potter
michael at potter.name
Thu Sep 11 19:30:17 PDT 2008
This statement:
print $Count . " " . join(", ", @a) . "\n";
Produces this errors message:
Use of uninitialized value in join or string at ./TransferTables.pl line 4154.
The array is a result of this statement:
my @a = $sth_s->fetchrow_array
I presume I have a NULL value in my database and it come back as a
undef in the array.
I rarely allow NULL values in a database so I don't know that from experience.
Anyway, Is there a graceful way to replace the udef values in @a with
the string "<NULL>"?
That way I will see them and I will not get the warning message.
Thanks,
--
Michael Potter
More information about the Chicago-talk
mailing list