in reply to Re^4: Definition of numerically equal and rationale for 'you' == 'me'
in thread Definition of numerically equal and rationale for 'you' == 'me'

Yes, even though I knew the result, I did test. I even used 5.14.0 on Windows like you. (ActivePerl build 1400, to be specific.)

>perl -e "print \"true\" if 'nanosecond'== 'nanosecond'" true >perl -e "print \"true\" if 'nanosecond'!= 'nanosecond'" >perl -e "print \"true\" if 'informal'== 'formal'" true >perl -e "print \"true\" if 'informal'!= 'formal'" >

'nanosecond', 'informal' and 'formal' are all numerically equal to zero, so your build is very buggy.

Replies are listed 'Best First'.
Re^6: Definition of numerically equal and rationale for 'you' == 'me'
by syphilis (Archbishop) on Mar 07, 2012 at 08:51 UTC
    so your build is very buggy

    Oh, of course ... *my* pathetic dumbarse build is buggy ... how could I *not* have realised this !!

    Now, excuse me while I go puke somewhere ....

    Rob
Re^6: Definition of numerically equal and rationale for 'you' == 'me'
by lutok (Scribe) on Mar 05, 2012 at 23:54 UTC

    I'm coming in a little late, but this is what I got on Mac Lion, perl-5.14.2:

    perl -e "print \"true\" if 'nanosecond'== 'nanosecond'" perl -e "print \"true\" if 'nanosecond'!= 'nanosecond'" true perl -e "print \"true\" if 'informal'== 'formal'" perl -e "print \"true\" if 'informal'!= 'formal'" true

    strange

    Update: Oh I see ... 'nan'...'inf'

      Could you give me the output of the following, please?

      perl -le'print "foo" == 0 ? "as per docs" : "deviates from docs"'

      perldata:

      strings that aren't numbers count as 0, just as they do in awk

        You missed the update :)

        $ perl -le " print int $_ for qw/ na nan nanners in inf infant /" 0 -1.#IND -1.#IND 0 1.#INF 1.#INF

        perlop mentions NaN, while bigint...