Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by Anonymous Monk
on Apr 13, 2005 at 13:48 UTC ( [id://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

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://447380]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-18 01:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found