in reply to Numbers aren't averaging correctly

You have shown a tiny part of your code but not, I suspect, the part likely to contain the error. How about posting a chunk of code that can be run and that shows the problem. For strong preference use <DATA> to read some sample data from a __DATA__ section. It would also help a lot if your output columns lined up with the headings!

It is highly likely that your problem is in code that splits or otherwise extracts the data from your input stream.

There does seem to be a correlation between input containing commas and bogus averages. Is that a hint?


Perl is Huffman encoded by design.