Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 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: (14)
As of 2014-10-24 10:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (131 votes), past polls