in reply to comparing two values under 'perl -w'

With all due respect, kappa.

When you aim to violate the underlying logic, you end up with code like that. You already state that NULL is not equal to NULL. This is also true for undefined; undefined is not equal to undefined.

If you force it to be that way, so be it. But Perl wasn't really written with that in mind, so it will be difficult to make your code elegant.


Everything went worng, just as foreseen.

  • Comment on Re: comparing two values under 'perl -w'

Replies are listed 'Best First'.
Re: Re: comparing two values under 'perl -w'
by kappa (Chaplain) on Apr 02, 2002 at 16:13 UTC
    btw,
    ~% perl -we 'print "Really???\n" if undef == undef;' + Use of uninitialized value at -e line 1. Use of uninitialized value at -e line 1. Really??? ~%

    I know that undef in numerical context is just 0, but...
      Wtith all due respect thats a big but...

      :-)

      Hmm. No pun intended.

      Yves / DeMerphq
      ---
      Writing a good benchmark isnt as easy as it might look.