Hello Thanks much for your answer
Am Mittwoch, 2. März 2005 15.15 schrieb Wiggins d'Anconia: > John Doe wrote: > [...] > > My logic says that a condition in the form > > if ($a != $val1 or $a != $val2) > > is always true. > > Unless both are false.... which is a basic premise of 'or'. I implicitly included the condition $val!=$val2, sorry for that... > >[...] > > print "Oups!\n" if 0==undef; > > # prints: > > Oups! # <<<<<<<< ????? > > > > Can anybody please explain this result to me. > >[...] > > The key here is that the == and != operators put their operands into > numerical context. 'undef' in numerical context resolves to 0. So the > first case is true. Aaarrggghhh! Thanks alot! > [...] greetings joe -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>