in reply to Mysterious the ways: == and eq
It is precisely because of this flexibility that you need different comparison operators. Because a scalar could be interpreted as both a number and a strings, you need to tell perl which basis you want to compare.
Let's say you have $a="1" and $b="000001". Numerically they are the same, but for the purposes of your application those leading zeros could be very important. Because perl has no way of knowing how you want to compare those two variables, you need to tell it by using the appropriate comparison operator.
--ZZamboni
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: Mysterious the ways: == and eq
by rjimlad (Acolyte) on May 25, 2000 at 23:52 UTC |