develooper Front page | perl.beginners | Postings from February 2002

Difference between == and eq

Thread Next
From:
wim
Date:
February 6, 2002 06:39
Subject:
Difference between == and eq
Message ID:
3C614030.2050909@belbone.be
Hello,

I have a small question: what's the difference between == and eq?

When I do:

if ( $menuitem == "modify_router") {
         print "Modify router<br>";
} else {
         print "Add router<br>";
}

it doesn't work. But when I change it to:

if ( $menuitem eq "modify_router") {
....

It works!
How comes?

-- 
Kind regards,

Wim De Hul
Belgacom Belbone
--------------------------------
  Mail   : wdh@belbone.be
  Mobile : +32 479 952004
  Ripe   : WDH25-RIPE
  Registered Linux User: #260015
--------------------------------


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About