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
In reply to RE: Mysterious the ways: == and eq
by ZZamboni
in thread Mysterious the ways: == and eq
by princepawn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |