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

Re: [MacPerl] web cgi question



Jerry Stratton wrote:

>>Thanks for all the help, folks!  I think I understand how to trade MAC
>>scripts with UNIX people now -
>>1. save a perl script as plain text
>>2. start the script with #!/path/to/perl/program/
>>3. make sure the script contains no 'mac specific' calls in it
>>
>>and then it should run on any UNIX machine that is running Perl?
>

>
>I'm not familiar with DOS/Windows, but I'd guess:
>$FileSep = "\";
>$VolumeStart = "C:\";
>$RelativeStart = "";
>

Depending on the server that your perl script is talking to MS-DOS
sometimes wants a double-backslash:  "C:\\whathever\\cgi-bin"

This is because the DOS backslash is the unix escape character as well as
the DOS path separator.  The first backslash unquotes the second leaving
you with one.

The programmer also has to be carefull about the EOL or end-of-line which
is different on all three of DOS, Mac, and unix.  One also has watch out
for the eight character upper case file names demanded by some Microsoft
stuff.  Some programs correct these incompatibilities for you - some don't.


Errors in any of the above tend to produce an "ERROR 404: URL NOT FOUND"
and a bothersome bug.

None of this is really specific to MacPerl.  The CGI glue works like a
charm.  It is just that not all other programs are written by a man as
competent and thoughtful as its author. :)

Matthais, and others, went over this recently.  Sandra Sillcott also has a
very good set of utilities.  There is also a wealth of other tutorials to
be found on the net.

All the best,
                     Mike Lee