Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 having an uproarious good time at the Monastery: (6)
As of 2016-04-30 10:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    :nehw tseb si esrever ni gnitirW







    Results (441 votes). Check out past polls.