in reply to My cgi nonsense.

You could try using CGI, it will make things simpler for you.

Having said that, this is what is causing the error messages:

my %input; my $wt=$input{'weight'}; my $d=$input{'date'}; my $g=$input{'Goal_Weight'};
You need to get the input variables (arguments), first, into the hash.