Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 perusing the Monastery: (7)
As of 2017-11-23 10:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (333 votes). Check out past polls.

    Notices?