Replace
$counts{$name}{$_} += ($masks{$_} | $letters) =~ /M/ for @unique;
with
for my $label (@unique) { print "$masks{$label} | $letters\n"; $counts{$name}{$label} += ($masks{$label} | $letters) =~ /M/; }
This will allow you to see what you are or'ing
In reply to Re^7: how to sum over rows based on column headings in perl
by Anonymous Monk
in thread how to sum over rows based on column headings in perl
by angerusso
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |