Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Efficient way to sum columns in a file

by Anonymous Monk
on Apr 13, 2005 at 13:48 UTC ( #447380=note: print w/ replies, xml ) Need Help??


in reply to Re: Efficient way to sum columns in a file
in thread Efficient way to sum columns in a file

I don't think the '$total += $sub += $F6;' part is doing what you expect it to... Actually, it doesn't add $F6 to both $total and $sub, but rather add it to $sub and then add $sub to $total, which generates a wrong total.


Comment on Re^2: Efficient way to sum columns in a file
Re^3: Efficient way to sum columns in a file
by tlm (Prior) on Apr 13, 2005 at 14:04 UTC

    The totals was obviously wrong; that should have alerted me to the error. Thank you very much!

    the lowliest monk

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://447380]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2014-09-02 23:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (32 votes), past polls