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

[MacPerl] Using CGI.pm correctly??



Greetings.  I tried posting this a day ago, but looks like
nobody received it.  Anyway, I put the CGI.pm folder along
side my MacPerl folder, just as I was instructed, and I 
also added it via Edit->Preferences->Libraries, seemingly
no problem..

I'm working on a way-simple script, something to get me 
started.  Looks like this:

#!perl

use CGI;
print "Content-type: text/html\n\n";
$MyDate = `date`;
$fname = $input{'first'};
$fnamelength = length $fname;
$lnamelength = length $input{'last'};

$output_file="Columbia HD:WebSTAR 2.1:allhw1.dat"; 
open (OF, ">>$output_file");
print OF $input{'last'}, ", ", $input{'first'}," on ",$MyDate, "\n";
print OF "\n";
print <<'end';
<html>
.... *snip*
thank you, $fname
</html>
end
 
Piece of cake, right?  I guess so... Anyhow, when I run this .cgi,
I get this error message:

# Can't locate CGI.pm in @INC.
File 'Columbia HD:WebSTAR 2.1:asgt1.cgi'; Line 3
# BEGIN failed--compilation aborted.
File 'Columbia HD:WebSTAR 2.1:asgt1.cgi'; Line 3
# Unbalanced scopes: 1 more ENTERs than LEAVEs
# Unbalanced saves: 93 more saves than restores

Also, when I run it successive times, the error changes.  It says,
that it's finding the error on line 6, then line 9, line 12, and
so on.. Even when it runs out of "lines" it still keeps going.. 
"Line 54" etc.. 

I think it's got something to do with my CGI.pm folder.. anything
anybody know of offhand??  I'd be much appreciative.

Thanks in advance,

David Barro


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch