[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] compiling error



I've been wracking my brains for two days solid over this - hopefully
someone can help!

I got a big, EXCPENSIVE book on "HTML and CGI", with lovely scripts for
things I really want to do - written in Perl for UNIX.  Realizing (one at a
time) what the (several) problems were, I downloaded MacPerl, downloaded
MacHTTP CGI script extension, carefully copied the UNIX code for a program
to send form results to email, saved it as a MacHTTP CGI (I'm using
Webstar, but that shouldn't matter, right?) - and consistently get syntax
error on line 8, a "compiling error"  at line 10, as well as a syntax error
in the same line near "}".  MacPerl help merely says it can't help me with
this.  I have NO experience with ANY Perl, I can see what the code is
supposed to do but I don't know the details of exactly how to write it -
and I'm frustrated beyond belief.  Can someone look at the first few lines
of my code and tell me what is the problem?  I'll be forever indebted...


#!/usr/local/bin/perl
#---------------
#program for sending form results
#------------

$mailprog = '/usr/lib/sendmail'

print "Content-type: text/html\n\n";

if ($ENV{'REQUEST_METHOD'} eq "get") { $buffer = @ENV{'QUERY_STRING'}: }
else { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); }