in reply to Re^6: converting binary to decimal
in thread converting binary to decimal
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+(?=.)//
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: converting binary to decimal
by harangzsolt33 (Deacon) on Jul 02, 2025 at 21:20 UTC |