You're getting the warning because when you invoke the CGI from the command line, you're not defining the form variable Submit. A quick workaround is to change
if ($cgi->param('Submit') eq "Go") ...
to
my $submit = $cgi->param('Submit') || "";
if ($submit eq "Go") ...