in reply to Removing leading zeros
Gives us 28 instead of 34 !!!perl -e ' $e = 0034; $e+=0;print $e'
This only work if we change this to:
What happens is that the number 0034 is internaly used by perl as an octal number. And octal 034 is Dec: 28 !!!perl -e ' $e = "0034"; $e+=0;print $e'
Any hints ?
----------------------------------- --the good, the bad and the physi-- -----------------------------------
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Removing leading zeros
by chipmunk (Parson) on May 15, 2001 at 01:07 UTC |