Are you running a 32-bit perl? It seems your sprintf has a problem with 18 digit numbers.
Try changing $size to 8 or 9. (I don't have a 32-bit perl to test on.)
Also replace s/0+(?=.)// with s/^0+(?=.)//
In reply to Re^7: converting binary to decimal
by tybalt89
in thread converting binary to decimal
by harangzsolt33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |