eq is used for comparing strings while == is used for numeric comparisons.
HTH
-----Original Message-----
From: wim
To: [EMAIL PROTECTED]
Sent: 2/6/2002 8:39 AM
Subject: Difference between == and eq
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 : [EMAIL PROTECTED]
Mobile : +32 479 952004
Ripe : WDH25-RIPE
Registered Linux User: #260015
--------------------------------
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]