James Parsons wrote:
> Hi everyone..
> 
> I'm still a Newbie so be gently
> 
> 
> I have a following in a file
> 
> Raw data   =
> 18822         188.22
> 133              1.33
> 2300            23.00
> 222003  `        2220.03
> 
> 
> And when I run the following perl script the total is extremely out of
> wacky, total should be 2432.58  not  7734.23
> 
> #!/usr/bin/perl -w
> 
> use strict;
> 
> my $total = 0;
> 
> open(FILE,"//usr/local/logs/eigen/temp/day_amt") || die $!;
> 
> $total += $_ while(<FILE>);
> 
> close(FILE);
> 
> my $value = 100;
> 
> $total = $total/$value;
> 
> #print  "\$$total\n",;
> 
> 
> 
> 
> 
> printf ("%7.2f\n",$total);
> 
> 
> Any help would be great.
> 
> Thanks
> James Parsons

        Then I run it I end up with the total you state you should get.  It was 
unclear whether the decimal point data was there or not. Running with or without the 
decimal point data, it gives the right total.

        Running AS 5.6.0 Build 623.

Wags ;)


**********************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
****************************************************************


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to