[ILUG] sprintf formatting question

Pádraig Brady P at draigBrady.com
Wed Aug 20 14:31:02 IST 2008


Phil wrote:
> 
> Hi,
> 
> my $foo = 5188931580; # > 4294967295
> print sprintf("%10u\n", $foo);
> 
> (actually prints out 4294967295)

I know nothing about perl, and don't intent to change that,
though I did have a similar issue with python:
http://bugs.python.org/issue1742669

That suggests that %10s or %10.f might work for you instead.

Pádraig.



More information about the ILUG mailing list