[102337] in RedHat Linux List

home help back first fref pref prev next nref lref last post

RE: What s wrong with this cgi script??

daemon@ATHENA.MIT.EDU (Charles Galpin)
Wed Dec 2 14:21:31 1998

Date: Wed, 2 Dec 1998 14:19:09 -0500
From: Charles Galpin <cgalpin@lighthouse-software.com>
To: "redhat-list@redhat.com"@Landmark.COM
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

The erro message tell you the reason

===== Original Message from redhat-list@redhat.com at 12/02/98 5:20 pm
>Hello:
>When I do "perl -c mailer.pl", my following script, I got errors:
>Bare word found line 11, near "/usr/lib"(missing operator before lib?)
>String found where operator expected at mailer.pl line 12, near "die"
>(Might be a runnaway multi-line "" string starting on line 11(missing semi
>colon on previous line??)
>String found where operator expected at mailer.pl line 14, near "print MAIL""
>(Might be a runnaway multi-line "" string starting on line 12)
>missing semi colon on previous line??)
>Bare word found line 14, near "print MAIL" TO"
>(missing operator before lib?)
>
>
>#!/usr/bin/perl
>require "cgi.pl";
>&ReadParse;
>print STDOUT "Content-type: text/html\n\n";
>print STDOUT "<title>Mail form results</title>";
>print STDOUT "<h1>Mail form results</h1>;

	END THIS STRING ABOVE


>
>open (MAIL, "|/usr/lib/sendmail $to")  ||
> die "<p>Error: Couldn't execute sendmail.\n";
>
>print MAIL "To:  $in{'to'}\n";
>print MAIL "From: $in{'from'}\n;
>print MAIL "subject: $in{'subject'}\n\n";
>print MAIL "$in{'body'}\n";
>close MAIL;
>
>print STDOUT "<p>All right mailed the following to <tt>$to</tt>:\n";
>print STDOUT "<p><pre>";
>print STDOUT "To: $in{'to'}\n";
>print STDOUT "From: $in{'from'}\n";
>print STDOUT "subject: $in{'subject'}\n\n";
>print STDOUT "$in{'body'}\n";
>print STDOUT "</pre>";
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>--
>  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
>		http://www.redhat.com http://archive.redhat.com
>         To unsubscribe: mail redhat-list-request@redhat.com with
>                       "unsubscribe" as the Subject.

-- Charles Galpin  <cgalpin@lighthouse-software.com>


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post