in reply to Re^3: Reading two files, cmp certain cols
in thread Reading two files, cmp certain cols
Counting needs two steps: Setting the counter to 0 before the loop and the incrementing step:
#Initialize the counter before the loop my $true_positives=0; while(<INPUT2>){ ... #instead of the push $true_positives++;
That's it, $true_positives has the number of positive results after the loop
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Reading two files, cmp certain cols
by sesemin (Beadle) on Sep 20, 2008 at 20:36 UTC | |
by jethro (Monsignor) on Sep 21, 2008 at 00:50 UTC |