Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Disadvantage of using 'eq' operator to compare numbers.

by ikegami (Pope)
on Jan 01, 2010 at 22:18 UTC ( #815233=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    >perl -le"print 1 == '1.0' ?1:0"
    1
    
    >perl -le"print 1 eq '1.0' ?1:0"
    0
    
  2. or download this
    >perl -le"print 2 < 10 ?1:0"
    1
    
    >perl -le"print 2 lt 10 ?1:0"
    0
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://815233]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2016-12-06 03:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (98 votes). Check out past polls.