E
ela
In a for loop retreiving individual $numAttr to derive the $tnumAttr, the
following will serve:
for ($i=0; $i<3; $i++) {
....
$tnumAttr += $numAttr;
....
}
However, I still have the following variables or more to get the totals,
$mcc,$se,$ppv,$sp,$npv,$tp,$tn,$fp,$fn
how to use the concept of associative array to get something like:
array->[mcc], array->[se] etc. so I can write a function and just pass the
arguments like:
Sum ($mcc,$se,$ppv,$sp,$npv,$tp,$tn,$fp,$fn);
sub Sum {
foreach $_ (@_) {
$array->[$_] += $_;
}
}
following will serve:
for ($i=0; $i<3; $i++) {
....
$tnumAttr += $numAttr;
....
}
However, I still have the following variables or more to get the totals,
$mcc,$se,$ppv,$sp,$npv,$tp,$tn,$fp,$fn
how to use the concept of associative array to get something like:
array->[mcc], array->[se] etc. so I can write a function and just pass the
arguments like:
Sum ($mcc,$se,$ppv,$sp,$npv,$tp,$tn,$fp,$fn);
sub Sum {
foreach $_ (@_) {
$array->[$_] += $_;
}
}