Cody Pendant has asked for the wisdom of the Perl Monks concerning the following question:
It caused me a great deal of confusion today.
if (111111 > 222222){ print "yes\n" } else { print "no\n" } # prints 'no' if (111111 > 0222222){ print "yes\n" } else { print "no\n" } # prints "yes"; if (111111 > '0222222'){ print "yes\n" } else { print "no\n" } # prints "no";
Even stranger, the effect doesn't happen with smaller numbers:
if (111 > 0222){ print "yes\n" } else { print "no\n" } # prints "no";
Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.
M-J D
|
|---|