in reply to Re^2: Math::BigInt and Leading Zeros
in thread Math::BigInt and Leading Zeros
The underlying perl library natively handles strings fine - just change '%25d' to '%25s':
zen% perl -MMath::BigInt -e '$i = Math::BigInt->new("123_456_789_000 +_000"); printf "%025s\n", $i' 0000000000123456789000000 zen%
Hugo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Math::BigInt and Leading Zeros
by Tanktalus (Canon) on May 05, 2005 at 12:55 UTC | |
by radiantmatrix (Parson) on May 05, 2005 at 19:43 UTC | |
by Tanktalus (Canon) on May 05, 2005 at 23:44 UTC |