in reply to When is 03 not equal to 03?
As perldata explains, octal and hexadecimal numbers in strings are not automatically converted to their decimal equivalents, so '033' becomes 33, while the numeric literal 033 becomes 27.$var = '033'; if ($var == 033) { print "Equal.\n"; } else { print "Not equal.\n"; }
|
|---|