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

need help

Thread Previous | Thread Next
From:
Luinrandir Hernsen
Date:
April 29, 2002 17:45
Subject:
need help
Message ID:
00f901c1efe0$0b20db60$6501a8c0@columbus.rr.com
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?
Thanks

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About