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

Re: [MacPerl] please help: How can I execute Perl script offline?



>Hi,
>
>I have been programming in Perl in Unix environment and want now to use my
>Mac at home (that is offline) to write Perl scripts and modify them later
>to Unix environment. I find it difficult to download and correct the perl
>script to correct a small spelling mistake. It would be much easier if I
>could write the whole script and test it in Mac and modify it later to Unix
>Perl environment.
>
>I have downloaded MacPerl but am unable to set it up correctly.
>
>I use BBEdit to write scripts and upload them to Unix server.
>
>I want to know how to set up MacPerl in order to interact with it through
>HTML pages that are locally stored in my machine.
>
>Unfortunately and strangly I am unable to find answer to my question at
>websites related to MacPerl.

>I would appreciate any help on this.

>With Kind regards
>Jeyachandran Kopinath

Jeyachandran,
Hi, I am doing just what you are asking about. However, MacPerl is not the
problem on my machine. It installed and is working just fine. I set up a
server on the same machine (MacHTTP which is shareware for $100). I'm using
MacOS 7.5.5 so Open Transport has to be set up with two configurations. One
to login to the internet through a modem and a second configuration to run
the server, netscape and Macperl on my mac without any connection to the
real internet.
  I just uploaded a shopping cart web site (two weeks of work all on the
mac) to a unix server last night and after playing with the permissions on
the unix server, the thing worked almost perfectly. For some reason, the
image.jpg  did not show up,whereas the image.gif's did. 
   Everywhere your code trys to open a file you have to put in a conversion
from the unix path to a mac path. 
   Something like:
   $path = "$data_setup_directory/$thefile_Iwant";
   if ($mac)
   {
       $path =~ s/^\.//;
       $path =~ s/\//:/g;
   }
where the $path is assumed to be something like: ./xxxxx/yyyyy/zzzzz.html

With 16Megs on your machine, you can run Netscape, MacHTTP(theserver),
BBEDit, a html editor, and MacPerl all at once and switch back and forth as
you edit and then try out the script in a matter of seconds. Hope this
helps. If you have problems, I can go into more detail on my setup.
John