Re: Difference between == and eq

2002-02-06 Thread Jeff 'japhy' Pinyan
On Feb 7, Leon said: >Apart from the fact that == is used for numeric comparison whilst eq is used >for string comparison, it would be of interest to note that == when used >with strings forces the strings to be read in numeric context which is zero. Not all strings have a numeric value of zero.

Re: Difference between == and eq

2002-02-06 Thread Leon
- Original Message - From: "wim" <[EMAIL PROTECTED]> > When I do: > > if ( $menuitem == "modify_router") { > print "Modify router"; > } else { > print "Add router"; > } > > it doesn't work. But when I change it to: > How comes? Apart from the fact that == is used for nu

Re: Difference between == and eq

2002-02-06 Thread Brett W. McCoy
On Wed, 6 Feb 2002, wim wrote: > I have a small question: what's the difference between == and eq? == is for numeric comparisons, eq is for textual comparisons. See perldoc perlop -- Brett http://www.chapelperi

RE: Difference between == and eq

2002-02-06 Thread Murphy, Land
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

Re: Difference between == and eq

2002-02-06 Thread Shawn
- Original Message - From: "wim" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 06, 2002 8:39 AM Subject: Difference between == and eq > Hello, > > I have a small question: what's the difference between == and eq? == i

Re: Difference between == and eq

2002-02-06 Thread walter valenti
eq: to use for the strings = : to use in numeric contest.(if you = in string contest in every true). If you don't know if are string or numerical use eq Walter > Hello, > > I have a small question: what's the difference between == and eq? > > When

Difference between == and eq

2002-02-06 Thread wim
Hello, I have a small question: what's the difference between == and eq? When I do: if ( $menuitem == "modify_router") { print "Modify router"; } else { print "Add router"; } it doesn't work. But when I change it to: if ( $menuitem e