> -----Original Message----- > From: Bradshaw, Brian [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 25, 2001 11:14 AM > To: [EMAIL PROTECTED] > Subject: if statement question > > > Hi list, > > I have some strange goings on in my code. and it might be the > if statement. > > I have the code: > if ($reason eq 'sale' && $method_of_payment != 'Purchase Order')
!= is for numeric comparison. Use ne for string comparison: if ($reason eq 'sale' && $method_of_payment ne 'Purchase Order') 'Visa' != 'Purchase Order' is FALSE, since both sides are numerically equivalent to zero. 'Visa' ne 'Purchase Order' is TRUE Common boo-boo. Don't feel bad. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]