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

[MacPerl] Simple macperl script problem...



Hello all:

I've written a short "learning Macperl script" to dump user input into a
text file.  The problem I'm having is that I keep getting a "file not found
error" when I try to execute the script from the browser.  I have checked
and rechecked the form and the script (maybe overlooking something in
script however).

The script works fine from Macperl.  Also, I have tested other scripts with
the browser (Netscape 1.1) and the same form and they work fine with
Macperl 5.03.

Here is the little script:

#!perl
#
# target.acgi...a script that provides a gateway to fill a
# file with user "target form" input.
#
# copyright (c) Steve Goodwin, January 1996
#
# this script uses Sandra Silcot's port of Steven Brenner's cgi-lib.pl library,
# i.e. "cgi-lib-mac.pl".

push(@INC,"Power HD:System Folder:Apple Menu Items:CGI
Scripting:macperl:Macperl f:lib");
require("cgi-lib-mac.pl");

#print the HTTP header with a status of 200 OK
print "HTTP/1.0 200 OK\r\n";

#print the Content-type header to identify the scripts's output as HTML
print "Content-type: text/html\r\n\r\n";

print "<HTML>\n";
print "<HEAD>\n";
print "<TITLE>Targets</TITLE>\n";
print "</HEAD>\n";
print "<BODY>\n";
print "\n";
print "<H1>Thanks for the new information.</H1>";
print "\n\n";

#footer of HTML response

print "</BODY>\n";
print "</HTML>\n";

#now input the user form info into a local file

open(DALLAS,">>Power HD:System Folder:Apple Menu Items:CGI
Scripting:macperl:dump.txt");

print DALLAS %in;
print DALLAS "\n";
print DALLAS
"----------------------------------------------------------------------\n";
close DALLAS;


Any suggestions?  Thanks for your time and help!  Happy new year.

Steve Goodwin
spoog@iag.net