T wrote:

> Hello:)
> 
> in my script my values come from my html form. I define them with:
> 
> my $OptOut = $q->param( "OptOut" );

if OptOut isn't passed it, you get under. the following should get rid of 
the warning:

my $OptOut = $q->param('OptOut') || '';

> 
> BUT, when i try to get them to print in the e-mail, i get the
> uninitialized value error "Use of uninitialized value at
> /cgi-bin/newreg.cgi line 316."
> 
> (thE FOLLOWING STARTS WITH line 316)
> if  ($OptOut eq "Yes")
> {print MAIL "\t-Do not use my information\n\n";}
> else {print MAIL "\t-not checked\n\n";}
> 
> I am using the cgi.pm module on an IHS server. Besides the error, it also
> gives me a screen after i hit submit on the form that says i have a header
> error. But it doesn't do it everytime, so i don't know if i really have
> one or not:(

that's probably because of the above warning. if the 'OptOut' param is 
missing, the warning is send out before you send your header, this mess up 
your cgi script. if the 'OptOut' param is passed it, everything is cool. 
that's why sometimes you see the error and sometimes you don't.

david

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to