in reply to How to Do Multiple OR in For Loops
Try this:
my $tp = 0; my $fp = 0; for( $pred, $pred1, $pred2, $pred3, $pred4, $pred5, $pred6 ) { if( $myhash{$_} ) { $tp++; } else { $fp++; } }
You might consider avoiding all those variable names with numbers. Just drop the values into an array called @pred in the first place. Then it would look like:
for( @pred ) { .........
Dave
|
|---|