[Kc] perl on unix box is frustrating

Andrew Moore amoore at mooresystems.com
Fri Jun 2 14:57:36 PDT 2006

On Fri, Jun 02, 2006 at 04:23:19PM -0500, C.J. Scheppers wrote:
> 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.

Hi C.J. -

It sounds like this perl script is a CGI script being run by a
webserver. Typically, in that case there are more informative error
messages in the error logs of the webserver. If it's apache, that may
be something like /var/log/apache/error.log. 

If you have shell acceess to the webserver, you can use SSH to login
to it. Then you can use 'tail' to view the end of the log file. That's
where the most recent entries are. If you use 
'tail -f /var/log/apache/error.log'
you may be able to see new log entries as they are added.

You may also want to look into the CGI::Carp module which may help you
get more informative messages in the error logs.

You may find it informative to run 'perl -c' on the files on your
local machine to syntax check them before you FTP them up there.

Hope it helps,

More information about the kc mailing list