Numerical literal "010" is 8 decimal.
>perl -wle"$x = 010; print $x; print $x == 10 ?1:0" 8 0
String literal "'010'" is 10 decimal when treated as a number.
>perl -wle"$x = '010'; print $x; print $x == 10 ?1:0" 010 1
In reply to Re: numbers with leading zeros
by ikegami
in thread numbers with leading zeros
by thunderbird
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |