From 50000481@plink.cityu.edu.hk  Sat Dec 30 12:34:12 2000
Received: from plink2.cityu.edu.hk (carol.cityu.edu.hk [144.214.5.208])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id MAA09736
	for <prolog@swi.psy.uva.nl>; Sat, 30 Dec 2000 12:34:11 +0100 (MET)
Received: from ceciserver (cpct78.cityu.edu.hk)
 by plink2.cityu.edu.hk (Sun Internet Mail Server sims.3.5.1999.03.02.17.58.p5)
 id <0G6D00M01PH076@plink2.cityu.edu.hk> for prolog@swi.psy.uva.nl; Sat,
 30 Dec 2000 19:34:13 +0800 (HKT)
Received: from ceciserver (cpct78.cityu.edu.hk)
 by plink2.cityu.edu.hk (Sun Internet Mail Server sims.3.5.1999.03.02.17.58.p5)
 with SMTP id <0G6D00L28PH0S2@plink2.cityu.edu.hk> for prolog@swi.psy.uva.nl;
 Sat, 30 Dec 2000 19:34:12 +0800 (HKT)
Date: Sat, 30 Dec 2000 19:37:46 +0800
From: Cecilia Wong <50000481@plink.cityu.edu.hk>
To: prolog@swi.psy.uva.nl
Message-id: <001d01c07254$ee1a6360$4e14d690@cityu.edu.hk>
MIME-version: 1.0
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
Content-type: MULTIPART/ALTERNATIVE;
 BOUNDARY="Boundary_(ID_i8GKCqyrcOxAZRpGZEKiXg)"
X-MSMail-Priority: Normal
X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-Priority: 3
Subject: [SWIPL] really need help! problem about CGI executable

This is a multi-part message in MIME format.

--Boundary_(ID_i8GKCqyrcOxAZRpGZEKiXg)
Content-type: text/plain; charset="big5"
Content-transfer-encoding: quoted-printable

Hi,=20

I am trying to use CGI (perl) to call my SWI-Prolog program. I followed =
something found=20
in this mailing list like this:

#! /bin/sh
exec /usr/local/bin/pl -f none -g
"load files (['http://localhost/myprologfile.pl'], [silent (true)])" -t =
main -- $*

(suppose "main" a program in the "myprologfile.pl")=20

 but it doesn't work! The error message is:

Bareword found where operator expected at test.pl line 2, near "/bin/pl"
	(Missing operator before pl?)
Scalar found where operator expected at test.pl line 3, near "-- $*"
	(Missing operator before  $*?)
syntax error at test.pl line 2, near "/usr/local"
Execution of test.pl aborted due to compilation errors.

Can anyone help? Thanks in advance!

Cecilia

--Boundary_(ID_i8GKCqyrcOxAZRpGZEKiXg)
Content-type: text/html; charset="big5"
Content-transfer-encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dbig5">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi, </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am trying to use CGI (perl) to call =
my SWI-Prolog=20
program. I followed something found </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>in this mailing list like =
this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>#! /bin/sh</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>exec /usr/local/bin/pl -f none =
-g</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>"load files =
(['http://localhost/myprologfile.pl'],=20
[silent (true)])" -t main -- $*</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>(suppose "main"&nbsp;a&nbsp;program in =
the=20
"myprologfile.pl")</FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;but it doesn't work! The error =
message=20
is:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>Bareword found where operator expected at test.pl line 2, near=20
"/bin/pl"<BR>	(Missing operator before pl?)<BR>Scalar found where =
operator=20
expected at test.pl line 3, near "-- $*"<BR>	(Missing operator =
before&nbsp;=20
$*?)<BR>syntax error at test.pl line 2, near "/usr/local"<BR>Execution =
of=20
test.pl aborted due to compilation errors.<BR></DIV>
<DIV><FONT face=3DArial size=3D2>Can anyone help? Thanks in =
advance!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Cecilia</FONT></DIV></BODY></HTML>

--Boundary_(ID_i8GKCqyrcOxAZRpGZEKiXg)--

