in reply to Generating statistics from data in file

Looks like you need to reverse these two lines:
# the first time through the loop, $score has no value! $sum = $sum + $score; ($name, $score) = split(/:/, $line);
like this:
($name, $score) = split(/:/, $line); $sum = $sum + $score;

Jeff

R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.