in reply to Printing two variables in the same line

Something you should note with your hash:

Your @grades array has students with multiple grades. When you convert @grades to %grades, you are losing the first entry.

The following script

use Data::Dumper; @grades = qw(Noel 25 Ben 76 Clementine 49 Norm 66 Chris 92 Doug 42 Carol 25 Ben 12 Clementine 0 Norm 66); %grades = @grades; print Dumper \@grades; print Dumper \%grades;
will output
$VAR1 = [ 'Noel', '25', 'Ben', '76', 'Clementine', '49', 'Norm', '66', 'Chris', '92', 'Doug', '42', 'Carol', '25', 'Ben', '12', 'Clementine', '0', 'Norm', '66' ]; $VAR1 = { 'Chris' => '92', 'Carol' => '25', 'Doug' => '42', 'Norm' => '66', 'Clementine' => '0', 'Ben' => '12', 'Noel' => '25' };
and you'll see that only the last entry for each student is stored in your hash (which is fine if that is what you want to do, but I thought I would point that out just in case you didn't realize that was happening).