in reply to Re: how to sum over rows based on column headings in perl
in thread how to sum over rows based on column headings in perl

Hey, thanks for your help. I have posted my complete code. The problem i am running into is to how to sum over rows, not columns. As long as column has "M" appearing once, I count it otherwise the count should be zero. However, I do care about if "M" appears in another row for the same name. So I have it sum it up. Am I being clear enough? I am getting stuck with how to add over rows which somehow has to be out of the for loop (over columns) but I am not able to figure out how.
  • Comment on Re^2: how to sum over rows based on column headings in perl

Replies are listed 'Best First'.
Re^3: how to sum over rows based on column headings in perl
by roboticus (Chancellor) on Jul 31, 2015 at 02:32 UTC

    angerusso:

    The algorithm I presented should work, but I went back and clarified it and showed an example to show how it works.

    ...roboticus

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