1

Decimal number calculation problem

view story
linux-howto

http://www.unix.com – I have a below snippet of code from my perl script and its causing a problem when the output of $lTAX is 0 (zero) its getting displayed as -0.00. I want output to be 0 not -0.00. Any help would be appreciated. Code: #!/usr/bin/perl my $lTotA = 50.94; my $lVatA = 8.49; my $lAllocD; my $lAdjNr = 'A23232'; my $lAcctNr = '2000971'; my $TAX = 90018; my $UNKNOWN = 90020; my $VAT_EXEMPT    = 9000019; $lAllocD{$lAcctNr}{$lAdjNr}{$TAX} = 3.7; $lAllocD{$lAcctNr}{$lAdjNr}{$UNKNOWN} = 0.0; $lAllocD{$lAcctNr}{$lAdjNr}{$VAT_EXEMPT} = 38.75; my $lTAX  =  spri (HowTos)