From jdjohnston2@juno.com  Mon Jan  1 05:51:05 2001
Received: from m7.jersey.juno.com (m7.jersey.juno.com [64.136.16.70])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id FAA01412
	for <prolog@swi.psy.uva.nl>; Mon, 1 Jan 2001 05:51:04 +0100 (MET)
Received: from cookie.juno.com by cookie.juno.com for <"agNVsrKwtOEeaIQ2GG4oqjlPzhZmgE23FwJNrHXS+8rgBZU6aTaA+w==">
Received: (from jdjohnston2@juno.com)
 by m7.jersey.juno.com (queuemail) id FSNZ7CFE; Sun, 31 Dec 2000 23:51:23 EST
To: 50000481@plink.cityu.edu.hk
Cc: prolog@swi.psy.uva.nl
Date: Sun, 31 Dec 2000 23:54:16 -0500
Subject: Re: [SWIPL] really need help! problem about CGI executable
Message-ID: <20001231.235416.-12579.0.jdjohnston2@juno.com>
X-Mailer: Juno 5.0.15
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Juno-Line-Breaks: 0-3,5-9,11-39
From: Jonathan D Johnston <jdjohnston2@juno.com>

On Sat, 30 Dec 2000 19:37:46 +0800,
Cecilia Wong <50000481@plink.cityu.edu.hk> writes:
>Hi, 
>
>I am trying to use CGI (perl) to call my SWI-Prolog program. I followed
something found 
>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 -- $*

1) This is a shell script, not Perl. For one thing, note the
     "shebang" line: #! /bin/sh
2) load_files/2 syntax is load_files(+Files,+Options).
     No space between "load" & "files" or between "files"
     & the "(".
3) load_files needs a path, not a URL.

>(suppose "main" a program in the "myprologfile.pl") 
>
>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.

These error messages are from Perl, not Prolog  You have fed
a shell script to Perl, so naturally there will be syntax errors.

>
>Can anyone help? Thanks in advance!
>
>Cecilia

Hope that helps,
Jonathan D Johnston
________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
http://dl.www.juno.com/get/tagj.

