in reply to Efficient Rating of Test Answers

I'm in the "make a hash table" camp. You're going to need to sit down and type the right answers per question, which are relatively arbitrary, so make data entry easy:

my $credit = [ { (map {$_ => 1.0} qw(g6 g7 g8 g9)), (map {$_ => 0.5} qw(g0 g1 g2 g3 g4 g5 k0 k1 k2 k3 k4 k5)), }, ];
So this is a reference to an array of hashes. The index to the array is the question number (alright, question number minus one), and the hash gives you the credit value of each answer. With exists, you can tell if the answer is wrong. Something like this:
if (exists $credit->[$qnum]{$answer}) { print "Q $qnum: ", $credit->[$qnum]{$answer}, " points\n"; } else { print "wrong\n"; }
If you don't care about warnings about undefined values, you don't have to have the "exists" test.

HTH