Forum Moderators: coopster & phranque

Message Too Old, No Replies

handling null values

         

shaan1980

4:51 pm on Jun 19, 2004 (gmt 0)

10+ Year Member



I need some help with handling null values in the database using perl.
My query say returns 8 records
If certain attributes are missing how do i handle it in the program

MichaelBluejay

5:52 pm on Jun 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Perl considers a variable to be True if it has any assigned value (besides 0). So, for example:

if ($variable) { print "I have a value."; }
else { print "Variable not defined." }

Is that what you're looking for?

DrDoc

5:58 pm on Jun 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



if(defined($variable)) {

}

shaan1980

5:32 am on Jun 20, 2004 (gmt 0)

10+ Year Member



thanks guys u answered my question