Perl Monk, Perl Meditation | |
PerlMonks |
Re^3: why are hex values not numbers?by hippo (Bishop) |
on Sep 26, 2016 at 21:49 UTC ( [id://1172681]=note: print w/replies, xml ) | Need Help?? |
Because decimals alone are special inside string literals. perldata states: Hexadecimal, octal, or binary, representations in string literals (e.g. '0xff') are not automatically converted to their integer representation. The hex() and oct() functions make these conversions for you. See hex and oct for more details. Consider the decimal autoconversion as a bit of handy magic, nothing more.
In Section
Seekers of Perl Wisdom
|
|