develooper Front page | perl.beginners | Postings from April 2002

need help

Thread Previous | Thread Next
Luinrandir Hernsen
April 29, 2002 17:45
need help
Message ID:
This line is from a script

if ($Config{'print_blank_fields'} || $Form{$field} ne '0')

I need to change the last part (in bold) to read for both 0 and the empty set ''
so the logic should read

if ($Config{'print_blank_fields'} || $Form{$field} ne '0' or '' )

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 '' )

I have tried
if ($Config{'print_blank_fields'} || $Form{$field} ne '0,')
if ($Config{'print_blank_fields'} || $Form{$field} ne '0' || $Form{$field} ne '' )
if ($Config{'print_blank_fields'} || $Form{$field} ne '0','')
and it doen't work
help? ideas?

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About