Subject: perl and quads
To: NetBSD Users <>
From: Jukka Marin <>
List: netbsd-users
Date: 09/09/2002 11:16:44

I noticed that perl (version 5.6.1 from pkgsrc) supports 64-bit integers,
but the formatting chars in printf do not:

% cat /tmp/

$foo = 2048*1024*1024;
printf("%u $foo\n", $foo);
$foo *= 2;
printf("%u $foo\n", $foo);
$foo *= 2;
printf("%u $foo\n", $foo);

% /tmp/
2147483648 2147483648
4294967295 4294967296
4294967295 8589934592

What's wrong?  I'd like to use the formatting chars method to control
field widths etc. but now perl seems to limit the output value to 2^32-1.
Using %lu or %U doesn't help.