On Mon, 2003-11-24 at 13:30, Eric Walker wrote:
> How can I test for empty strings and nulls on a particular value.   When
> I get an empty string or a null value I need to do something.

Hi Eric,

To test for a empty string simply do the following:

if ($mystring eq "") { 
        #string is empty
}

For a null or undefined value do:

if($mystring) {
        #variable is undefined
}

the long version is:

if($mystring eq undef) {
        #variable is undefined
}

HTH,
Kevin
-- 
Kevin Old <[EMAIL PROTECTED]>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to