#!/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++; }