On Mon, 4 Jun 2001 [EMAIL PROTECTED] wrote:

> if ( $formdata{view_name} ne "" ) {
>   $view = $formdata{view_name};
>   $viewtag = "1";
> }
>
> is there a special method for testing against a null string for a form
> field's value? i am using the above data, but it seems to always return
> with a value of "1" making me think that something is incorrect in my if
> test.

You can say the equivalent

        if($formdata{$view_name}) {
                ...
        }

since an empty string (or a string that is "0") will return false.  But
are you *sure* there isn't a value in the hash for that form field?

> finally, my questions are starting to deal with perl used within cgi. i'm
> a (brand) newbie to perl. should these questions go to beginners@ or
> cgi-list@

You're in the right place.  This list (beginners-cgi) is the recommended
list for CGI questions.

-- Brett

Brett W. McCoy
Software Engineer
Broadsoft, Inc.
240-364-5225
[EMAIL PROTECTED]

Reply via email to