open scores, "a:/scores.txt" || die "what did you idiots do with the scores file."; while(){ chomp; @all = split /:/; for($ctr=0; $ctr <= @all; $ctr++){ @student = shift @all; @score = shift @all; print @student; print @score; } # print "the average of the scores is $average "; }