jkva has asked for the wisdom of the Perl Monks concerning the following question:
Wise monks, I lay the following observation before you :
1 == 1; is True.1 == 2; is False.
'a' == 'a'; is True.
'a' == 'b'; is True.
'1' == '1'; is True.
'1' == '2'; is False.
'1' == '1foo'; is True.
'1' == 'foo1'; is False.
This must have something to do with the way the == equality operator works. Is this documented? I could not find it in the perldocs...Does anymonk have enlightenment?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Equality operators
by Hue-Bond (Priest) on Apr 25, 2006 at 11:41 UTC | |
Re: Equality operators
by BrowserUk (Patriarch) on Apr 25, 2006 at 11:59 UTC | |
Re: Equality operators
by mantadin (Beadle) on Apr 25, 2006 at 11:40 UTC | |
by jkva (Chaplain) on Apr 25, 2006 at 11:41 UTC | |
by davorg (Chancellor) on Apr 25, 2006 at 11:44 UTC | |
by salva (Canon) on Apr 25, 2006 at 11:46 UTC | |
by ikegami (Patriarch) on Apr 25, 2006 at 14:44 UTC | |
Re: Equality operators
by bart (Canon) on Apr 25, 2006 at 11:43 UTC | |
Re: Equality operators
by davorg (Chancellor) on Apr 25, 2006 at 11:43 UTC | |
Re: Equality operators
by GrandFather (Saint) on Apr 25, 2006 at 11:45 UTC | |
Re: Equality operators
by blazar (Canon) on Apr 26, 2006 at 10:30 UTC | |
Re: Equality operators
by rhesa (Vicar) on Apr 26, 2006 at 11:37 UTC | |
Re: Equality operators
by perladdict (Chaplain) on Apr 25, 2006 at 13:24 UTC |
Back to
Seekers of Perl Wisdom