APM: Null fields and 100% porcessor

Jim Leonard jimleona at cisco.com
Tue Apr 1 16:12:35 CST 2003


The warnings sound like they are coming from perl using the "-w" option
when you are doing the fetchrow. If everything is working well and the
only problem is the warning for an unitialized variable ( the 'chatty'
side of -w ) then by all means turn off -w. You can turn it back on when
you are back editing or testing.

Jim

> -----Original Message-----
> From: austin-admin at mail.pm.org 
> [mailto:austin-admin at mail.pm.org] On Behalf Of Goldilox
> Sent: Tuesday, April 01, 2003 3:52 PM
> To: austin at mail.pm.org
> Subject: Re: APM: Null fields and 100% porcessor
> 
> 
> 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
> >
> >
> >
> >
> >
> 
> 
> _______________________________________________
> Austin mailing list
> Austin at mail.pm.org
> http://mail.pm.org/mailman/listinfo/austin
> 




More information about the Austin mailing list