OK, let's suppose you use CGI::Lite. Here's a simplistic script you might write to process any number of batches of fields:
#!/usr/bin/perl -T
use strict;
use warnings;
use CGI::Lite ();
print "Content-type: text/plain\n\n";
my $cgi = CGI::Lite->new ();
my $params = $cgi->parse_form_data;
my $i = 0;
while ($i <= $#{$params->{Professor}}) {
print "Professor $i is $params->{Professor}->[$i]\n";
print "IDNum $i is $params->{IDNum}->[$i]\n";
# ... carry on with other fields here
$i++;
}
Update: See also the get_multiple_values convenience method in the documentation which is a benefit if you don't know for sure that there will be more than one of each item.