Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

eq vs. ==

by c (Hermit)
on Jul 20, 2003 at 10:19 UTC ( #276020=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ($val eq '2') {
      print 'foo';
    }
    
  2. or download this
    if ($val == '2') {
      print 'foo';
    }
    
  3. or download this
    (Why do we have separate numeric and string comparisons?  Because
    we don't have special variable types, and Perl needs to know
    whether to sort numerically (where 99 is less than 100) or 
    alphabetically (where 100 comes before 99)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://276020]
Approved by Corion
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2014-10-25 20:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (149 votes), past polls