in reply to Assigning a hexadecimal string

Numbers with a leading 0 aren't interpreted as decimal. '0x' is used for hex, '0b' for binary and '0' for octal.

See Scalar value constructors in perldata for details.