>>>>> "Todd" == Todd Kennedy <[EMAIL PROTECTED]> writes:

Todd> Hello, I am trying to test for a NULL value in a string variable
Todd> but am unable to figure it out. I see that a RE of s/^\s// would
Todd> test for a space at the beginning of a variable or line, but I
Todd> can't seem to figure out how to test for a NULL value. Can
Todd> anyone help me out?

Do you mean "NULL" as in "empty string"?

  $string eq ""

or

  ! length($string)

will do.  But if you mean something else by NULL, you'll need to be
more specific.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

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

Reply via email to