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.
In reply to Re: perl -e0octal
by dga
in thread perl -e0octal
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |