[azipa] Perl/CGI help<-- found it!
Lucas Vogel
lvogel@exponent.com
Fri, 28 Apr 2000 23:41:02 -0700
You know...
With Zope there is a Poll product, one of many different products they have.
All you do is set up the questions and answers, and it does everything.
I never did make it to the Zope presentation, though I have talked with Jiva
at least a little bit; those who weren't sold on Zope then should really
consider it when it comes to website application design; IMHO zope can't be
beat.
My $.02,
Lucas Vogel
-----Original Message-----
From: Mike Cantrell [mailto:yomahz@devnull.org]
Sent: Thursday, April 27, 2000 8:12 PM
To: plug-discuss@lists.PLUG.phoenix.az.us
Subject: Re: [azipa] Perl/CGI help<-- found it!
Doh... I found your attachment... I restarted mail client and there it
was (I'll blame it on windows... yeah... that's it.).
The problem is this:
#total votes
$total== $opt_a + $opt_b + $opt_c;
You're using the == operator which compares the values. I think you want
to use = to assign the value.
Regards,
Mike Cantrell
Mike Cantrell wrote:
>
> 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
> >
>
> _______________________________________________
> Plug-discuss mailing list - Plug-discuss@lists.PLUG.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
_______________________________________________
Plug-discuss mailing list - Plug-discuss@lists.PLUG.phoenix.az.us
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss