On 11/11/98, Jeff at MacTech took the time to write: >In article <mac-perl.v03130308b26ff45dc205@[206.251.80.73]>, Patrick Beart ><patrick@WebArchitecture.com> wrote: > >> I want to (eventually build and...) test a (Mac-)PERL CGI script on >>my local hard drive. >> >>1) What is the mechanism or process to get the Web page to call the >>script? If the Web page contains the usual "<FORM >>Action="http://www.domain.com/cgi-bin/script.pl" Method="POST">" tag and >>attributes, does this need to be changed for testing purposes to reference >>the local path on my hard drive (I would think so.)? > >You need to use a web server--just pointing your browser to the script >won't work. (The web server knows how to call a cgi program, but the >browser doesn't. It just knows how to talk to a server.) I've used >NetPresentz for this, and it works fine (and I believe it is on the >MacPerl-book CD, and definitely elsewhere on the net). I just followed the >directions in the "Quick Start" readme with NetPresentz, and all went >smoothly. > >>2) What does the first line of PERL ("/usr/bin/perl" on for UNIX-based >>systems) need to be changed to? I thought that I read somewhere in the docs >>that it could be just "/perl" and MacPERL would pick it up. > >It doesn't much matter. You can leave it out with no ill effect, or use >#!perl if you like. It's really only Unix that _needs_ this (to tell it >what app to use to run the script). The Mac (and Win) use different >mechanisms for this, so the "shebang" line isn't crucial. >-- Thanks! This suggestion (using NetPresentz) was at least reasonable, as compared to another suggestion regarding using WebStar. As I've stated previously, I love my Mac but Macs as servers leave me a bit cold. Also the cost of something like WebStar - just to TEST a CGI script - seemed more than a bit unrealistic. You are correct, BTW, about NetPresentz being on the MacPERL book CD. I checked. (Thanks, Chris and Vicki!!) Still seems like a "apples-and-oranges" issue - uploading the script in progress to my normal UNIX server and testing it that way, or setting up NetPresentz on my local machine. Have to decide. Patrick Beart ------------------------------------------------------------------- patrick@WebArchitecture.com 503-281-4147 Portland, OR Web Architecture: http://www.WebArchitecture.com * Founding MEMBER * Internet Professionals Northwest. (www.ipn.org) * MEMBER * Webmaster's Guild/ Association of Internet Professionals ------------------------------------------------------------------- ***** Want to unsubscribe from this list? ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch