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

re: [MacPerl] compiling error



sadieo@itsa.ucsf.EDU (Sadie O. McFarlane) writes:
} 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' # <--  missing semicolon

That's why your syntax error.

You do realize that there is no /usr/lib/sendmail on a Mac, don't you?
Your code is not going to work if you're just copying it out of a book.

} 
} print "Content-type: text/html\n\n";
} 
} if ($ENV{'REQUEST_METHOD'} eq "get") { $buffer = @ENV{'QUERY_STRING'}: }
} else { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); }
} 
} 
} 
} 
---
--------
Paul J. Schinder
NASA Goddard Space Flight Center,
Code 693, Greenbelt, MD 20771 USA
schinder@pjstoaster.pg.md.us