Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

eq vs. ==

by c (Hermit)
on Jul 20, 2003 at 10:19 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-03-29 11:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found