APM: Null fields and 100% porcessor
Goldilox
Goldilox at teachnet.edb.utexas.edu
Tue Apr 1 15:51:53 CST 2003
dbii at mudpuddle.com writes:
>>>> while(my @newdata = $newsth->fetchrow_array()){
>>>> print "Before: $newdata[1] - $newdata[2]\n";
>>>> $newdata[1] = "N/A" if $newdata[1] eq "";
>...
>>>> 1)
>>>> $newdata[3] = "N/A" if undef $newdata[3];
>
>Do you mean you tried:
>
> $newdata[3] = "N/A" if ! defined $newdata[3];
>
>or what you wrote? undef undefines the value, while defined checks if it is
>defined. Maybe that was the problem?
>
actually I tried
> $newdata[3] = "N/A"
unless
> defined $newdata[3];
but I thought I was being dumb because defined is only for arrays and I am
dealing with a scalar variable - so I didn't mention it here. It gave me the
same warnings "uninitialized variable in string or concatenation".
Rhett
>
>
>
>
>
More information about the Austin
mailing list