On Fri, Jan 04, 2002 at 10:23:48AM -0600, [EMAIL PROTECTED] wrote:
>
> @row = map { defined ? $_ : '' } @row;
I think you'll find that this is faster:
$_ = '' unless defined foreach @row;
The DBI docs already include a variant of that:
Here's how to convert fetched NULLs (undefined values) into empty strings:
while($row = $sth->fetchrow_arrayref) {
# this is a fast and simple way to deal with nulls:
foreach (@$row) { $_ = '' unless defined }
print "@$row\n";
}
Tim.
