Fwd: Re: [azipa] Perl/CGI help
Mike Cantrell
yomahz@devnull.org
Thu, 27 Apr 2000 19:35:35 -0700
Unfortunately, I didn't get your attachment so I can't review your code.
CGI debugging can really suck sometimes... What I usually do is create a
debug log and throw print statements in everywhere so I can make sure
the variables contain what I think they do. I also use the stict modual
which helps prevent spelling mistakes with variables.
try this at the beginning of your code:
---cut here--
use CGI::Carp;
BEGIN {
use CGI::Carp qw(carpout);
open(LOG, '/tmp/web.log') #or 'c:\temp\web.txt' in your case
or die "Unable to append to mycgi-log: $!\n";
carpout(*LOG);
}
print STDERR "testing debug log\n";
--end cut--
You can use the strict module which makes you declare your variables
before you can use them... it helps alot with spelling errors and makes
your programs a little faster...
put this at the beggining of your code:
--cut here--
use strict;
my $variable; #declare variables with my before you use them.
my $string = "value"; #you can assign values while declaring
--end cut--
Good Luck... if you want to send me the code, I'd be happy to look at
it.
Regards,
Mike Cantrell
Laurie Ann Silberman wrote:
>
> Any help would be greatly appreciated.
>
> LA
> ----- Original Message -----
> From: Laurie Ann Silberman
> To: azipa@listbot.com
> Sent: Thursday, April 27, 2000 8:36 AM
> Subject: [azipa] Perl/CGI help
>
> AZIPA Discussion List - http://www.azipa.org
>
> I am currently teaching myself Perl/CGI (on Win32 systems) for my new
> position. My first assignment is to create a poll using a flat ASCII data
> file.
>
> Testing confirms that:
> 1. The results page will build
> 2. The data file is loading
> 3. The input from the poll form is loading.
>
> But when I try to run the whole thing together --- nothing. No error
> messages, just nothing. A team member with more Perl experience scanned
> my
> code and saw no reason why it should not run.
>
> The files are attached. I appreciate any help you code maniacs can give.
>
> Laurie Ann
>