"Luinrandir Hernsen" <[EMAIL PROTECTED]> wrote in message
00f901c1efe0$0b20db60$[EMAIL PROTECTED]">news:00f901c1efe0$0b20db60$[EMAIL PROTECTED]...
This line is from a script

> Or to say it another way I need the following two lines to be one.
> if ($Config{'print_blank_fields'} || $Form{$field} ne '0')
> if ($Config{'print_blank_fields'} || $Form{$field} ne '' )

in perl, 0 (zero) and '' (the empty string) and undef() (the undefined
value) all evaluate to false. Actually they are the only three things in
perl that evaluate to false ( well '0', a stringified 0 (zero) ).

I read this in english as:

if the value of $Config{'print_blank_fields'} is true OR the value of
$Form{$field}is true then ....

so I would write it as:

if ( ($Config{'print_blank_fields'}) or ($Form{$field}) ) { .... }

Let us know if that works....

Todd W.
[EMAIL PROTECTED]





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

Reply via email to