in reply to sumof - attempting to sum a column from each file

ricky5ive:

You're setting your count to 0 after each line read. You want to do it only once per file. So move the my $sumof=0; to just before or after the open statement.

You're also summing up the items *while you're still reading the file*. Finish reading the lines before doing the summing operation.

...roboticus

When your only tool is a hammer, all problems look like your thumb.