Updated on the suspicion that some (mis)read the previous wording as "snarky" when the question is merely intended to offer a parallel case to consider:
And if If you lived in a locale where the language was not your native tongue,
you'd would you complain about how it differed from the language of your childhood?
In any case, you'll find a full and complete explanation of the output from your OP by reading about eq and == which do NOT perform the same test.
Update, repeating Annonymonk's above: eq is used when testing for string equality; ==, for numeric equality. Also as noted above, warn will let you know if you abuse ==. But the bottom line is, I think, that (in the best of all possible worlds) different languages can serve different needs and can, therefore, be expected to call upon the programmer to use approprikate methods for each.
Or, as others have suggested, your work (and your life) will be made easier if you understand your tools before attempting to use them
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.