It looks like you don't have CGI.pm installed (???). Try installing that. Other than that quote the exact error here and we will probably have more luck.
The CGI module is already installed. Here is the exact error which was a bit different than I thought: Global symbol "$query" requires explicit package name at enquiry02.pl line 6. Any ideas??