You have not instantiated a CGI object. Either use the :standard interface and do not use the $cgi object, or create a new CGI object and forego the :standard interface:
use CGI;
my $cgi = new CGI;
my $field = $cgi->param('field');
# versus
use CGI ':standard';
my $field = param('field').