I'm thinking 
if  (!defined($row[$i])) 

or what do the experts say.

----- Original Message ----- 
From: "Simon Oliver" <[EMAIL PROTECTED]>
To: "Michelle Gerfort" <[EMAIL PROTECTED]>
Cc: "DBI-users" <[EMAIL PROTECTED]>
Sent: Thursday, February 22, 2001 3:40 PM
Subject: Re: Handeling undef data.


> >     if ($row[$i] ne ""){
> This tests for an empty string not an undefined value.
> 
> Try something like:
> 
>    if (defined $row[$i]) {
>      if ($row[$i] ne "") {
>        print $row[$i] . "\t";
>      } else {
>        print "Empty string in row\t";
>      }
>    } else P
>      print "NULL value in row\t";
> }
> 
> --
>    Simon Oliver
> 
> 

Reply via email to