Using Perl with MacHTTP

In order to use perl scripts with MacHTTP, you need two things, the MacPerl application itself, and the MacPerl CGI applet for use with MacHTTP. The MacPerl application can be found on the major Mac archives, including: You can find the CGI applet at the following URL: To create your own Perl applet, you need to use ResEdit to replace to contents of the TEXT resource in the CGI applet with your own Perl source. You should examine the existing source first, as it shows how the arguments are passed to your script. This applet understands both the "GET" and the "POST" methods.

With the next release of MacPerl, using ResEdit will be unnecessary, as MacPerl itself will be able to compile CGI applets as well as regular applets.

For more information on Perl, the best resources are the Unix man pages, and the book, Programming Perl, by Randal Schwartz, and Larry Wall, the author of Perl. Another good source is the Perl WWW Site.

For more information on CGI, see The Common Gateway Interface on NCSA's server.


sra October 10, 1994