Without directly addressing the primary issue, switching to the standard
CGI might make things a lot easier for you .. See especially the "FETCHING THE PARAMETER LIST AS A HASH:" section of the docs.
use CGI qw/:standard/;
my $q = new CGI;
my %form_data = $q->Vars;
use Data::Dumper;
print Dumper \%form_data;