in reply to perl -e0octal
Perl treats literals coded into your program with a leading 0 specially.
perl -e '$a=017; $b=0x17; print "$a $b\n";' 15 23
The first number which is treated as octal is 15 in decimal and the second is treated as hexidecimal and so is 23 decimal.
|
|---|