Hi Dave,

my $amount2 = 00000013625;


As you pointed already. 00000.... is an octal constant

$amount = sprintf("%011d", $amount1 + $amount2);


and: printf "%d" casts to a signed int
unfortunately the printf interface doesn't give a good way to say "deal with this number, whether perl stored it as signed, unsigned, or floating point"


So I guess your best bet is to use: %f
though that doesn't give as much precision as %d/%u on some platforms/

HtH
--
Regards,
Edward WIJAYA
SINGAPORE

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to