in reply to Re: •Perl Puzzle, was Re: (OT?) n(n-1)/2
in thread (OT?) n(n-1)/2

3. undef equals to '0'

No.
undef evaluates to 0 in numeric context, to an empty string in string context. In boolean context, it is false. However, undef + 0 would eq '0', because first 0 + 0 is calculated, and then the result (0) is put in string context, and will be the string 0, which is in every way identical to 0 :)

When undef is used with a numeric (+, -, * etcetera) or string operator (., x, =~, etc) that is not an assignment (+=, -=, ++, etc) itself, a warning will be emitted.

++ vs lbh qrpbqrq guvf hfvat n ge va Crey :)
Nabgure bar vs lbh qvq fb jvgubhg ernqvat n znahny svefg.
-- vs lbh hfrq OFQ pnrfne ;)
    - Whreq

  • Comment on Re: Re: •Perl Puzzle, was Re: (OT?) n(n-1)/2