[Kc] perl on unix box is frustrating

C.J. Scheppers cscheppers at kc.rr.com
Fri Jun 2 23:59:56 PDT 2006

Many thanks so far for suggestions.  Here are some more clues.  I'm 
on a Mac G3 using BBedit, saving script with unix line feeds.  FTP is 
by fetch, placing the file as text on the unix server.  Full 
permission to read, write, execute.  By deleting one character of 
this code, the script will run; by having that one extra character, 
the script will not run.  Seems like a buffer is filling up and 
overflowing?  As you can see from the script, everything is commented 
out, right?  I'm just trying to get the script to run, it doesn't 
have to do anything right now except print an html page.  If I can 
figure out the problem, I'll resume programming to open file, parse, 
print records, etc.


#require 'cgi-lib.pl';

#require 'lock.sub' || die "Require: $!\n";

#sub CgiDie {
#  local (@msg) = @_;
#  &CgiError (@msg);
#  die @msg;

#item type|item subdivision|short name|alternate/full 
name|webpage|picture|product number|price|eol

#chdir ("../drawer");

#$dir = "E:\\web\\dorenek\\quiet";

#$here = "list";

#open (READ,"$here") || die "Require: $!\n";



#my @fields = split(/\|/,$file[0]);

#$a = $fields

print "Content-type: text/html\n\n";

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

>C.J. Scheppers wrote:
>>  Hi,
>>  I'm writing perl for someone whose site is on a unix box.  I spend 
>>an enormous amount of time just trying to debug some simple thing. 
>>I must delete sections of code until the script runs, then add the 
>>code back a line at a time to see what's going wrong.  Unix doesn't 
>>seem to give any more hint as to what's wrong than The server 
>>encountered an internal error or misconfiguration and was unable to 
>>complete your request.
>>  Now the really frustrating part is that I cannot add the following 
>>line which is also commented out:
>>  #@file = <READ>;
>>  so I have to delete the line a letter at a time until this allows 
>>the script to at least run:
>>  #fi
>>  This will not run:
>>  #fil
>>  I save the script as text only, ftp it to the site as text and set 
>>the permissions to run.  The script runs with the #fi line but not 
>>the #fil line.
>>  Any ideas?
>>  Thanks,
>>  C.J.
>>  _______________________________________________
>>  kc mailing list
>>  kc at pm.org
>>  http://mail.pm.org/mailman/listinfo/kc
>Hi CJ,
>First comment, if you can, debug as much as possible on a local 
>machine. Even if you don't have a webserver environment, you can 
>test parts of the code.
>second comment, first use the !#path/to/perl -w switch.
>and then add this to your script while debugging under the webserver
>    use CGI::Carp qw(fatalsToBrowser);
>That should help.
>Good luck CJ,
>Five minutes of Silence,
>Meditate. Breathe. Be Alive.

More information about the kc mailing list