Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^5: Definition of numerically equal and rationale for 'you' == 'me'

by MidLifeXis (Prior)
on Mar 02, 2012 at 14:09 UTC ( #957473=note: print w/ replies, xml ) Need Help??


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'

I get exactly the opposite results under 5.8.8 and 5.8.9, hpux, msys, and windows. One such example:

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

Update: Under strawberry 5.14.2 MSWin32-x86-multi-thread, the results are different:

$ /c/perl/strawberry/perl/bin/perl -e "print \"true\" if 'informal'!= +'formal'" true $ /c/perl/strawberry/perl/bin/perl -e "print \"true\" if 'informal'== +'formal'"

Update: Ahhhh! Very sneaky :-).

--MidLifeXis


Comment on Re^5: Definition of numerically equal and rationale for 'you' == 'me'
Select or Download Code
Re^6: Definition of numerically equal and rationale for 'you' == 'me'
by syphilis (Canon) on Mar 02, 2012 at 23:43 UTC
    I get exactly the opposite results under 5.8.8 and 5.8.9, hpux, msys, and windows

    The compiler that was used to build perl affects the behaviour.
    On Windows, ActivePerl (built using Microsoft Compilers) apparently doesn't display the behaviour, but MinGW-built perls do.
    And I think there's a fairly recent perl that throws another spanner in the works by asserting (incorrectly) that nan==nan is true.

    I'm surprised that hpux and msys make a liar out of me with 5.8.9. On my linux box (an old Mandrake-9.1), behaviour is as I asserted with 5.8.9 onwards.

    Cheers,
    Rob

      (unvalidated - apply salt blocks as necessary) I wonder if this is an aton atoi feature. Version of the OS may make a difference then.

      --MidLifeXis

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://957473]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (12)
As of 2014-07-25 18:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (174 votes), past polls