in reply to Form parsed incorrectly

CGI::Carp is a different module. From the error you are getting, I am assuming you replaced use CGI with use CGI::Carp qw(fatalsToBrowser);. Wrong! You need to start off with what I have below. I've included diagnostics to explain any errors in further detail. On top of this, you say you are checking for errors with open() and close()... I don't see that in your code.

#!/usr/bin/perl -w use strict; use warnings; use diagnostics; use CGI; use CGI::Carp qw(fatalsToBrowser); # rest of script here