You are strongly advised to use the CGI modules that are available on the Internet. The most up-to-date module that I know about is called cgi.pm-but you must be using Perl v5.002 or an even newer version in order to use it. cgi.pm is very comprehensive and covers many different protocols in addition to the basic CGI standard.
You might find that cgi.pm is overkill for simple CGI applications. If so, look at cgi-lite.pl or cgi-lib.pl. This library doesn't do as much as cgi.pm but you'll probably find that it is easier to use.
More information on cgi.pm and cgi-lib.pl are given in the next chapter. You can find both of these scripts at one of the CPAN Web sites that are mentioned in Appendix A.