$control = @score; should be
$control = $#score + 1; to get the size of the array (I believe that's what you're trying to do...
As said before,
$names[$sub-1] = $tem; should be
$names[$sub-1] = $temp2;
You also have an error in this for loop... (You need to use your $ctr, and reset it to 0 before the loop.)
$ctr = 0;
foreach(@score){
$total += $score[$ctr];
$ctr++;
}
The average score should be
($total / $control) or
($total / $ctr), lowest test score should be
$score[0], and the highest should be
$score[$control - 1] or
$score[$ctr - 1]
print(map(lc(chr),split(6,qw/99672682673683684689632658645641610607/)));