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

Re: [MacPerl] Problem running Perl on Mac



At 21.37 11/16/97, bing@quadra.net wrote:
>I'm trying to run a unix compatible script on my ISP's Mac server and when
>the .pl file runs from my browser I only receive the literal script output
>instead of the formated html output. I guess my question is, is there any
>references that might address issues going to and from unix to Mac's that
>someone can point me to?

There are differences between the two Perls, somewhat described here in the
slightly out-of-date FAQ:

        http://www.industrialstrengthsw.sk.ca/MacPerl/MacPerlFAQ.html

Also, I am finishing up the chapter on CGI for my MacPerl book, and the
draft will be online soonish in PDF and PS formats.

        http://www.ptf.com/macperl/ptf_book/

But most important is that you use a recent version of MacPerl (5.1.5r4,
preferably) and that you save it with the CGI Script extension from the
MacPerl app.  This extension saves the script as an application which
communicates to the MacPerl app and the web server via Apple Events (it
uses the WebStar CGI protocols, which are supported by most Mac OS web
servers).  You should also name the script with the ".acgi" extension, as
that allows some servers to process your request asynchronously.


>I notice directory structures are different as they say their Perl compiler
>is at Macintosh_HD:MacPerl Ä:MacPerl and my script uses references as in
>#!/usr/local/bin/perl I know that cant help matters...

The path on the #! line is mostly ignored by MacPerl.  As long as you have
"#!" and "perl" on the line, you are fine.  Most people put the same thing
as their Unix box uses (i.e., "#!/usr/bin/perl"), and others just use
simply "#!perl".  But you could even use "#!perlfsdasd" and it would be
fine.  Actually, you can in some cases leave it off altogether, but that is
not reccomended.

--
Chris Nandor               pudge@pobox.com           http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==                    MacPerl: Power and Ease                     ==#
#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#



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