Re: Use of uninitialized value in string eq at ./adpanel.pl line37.

2001-06-08 Thread Brett W. McCoy
On Fri, 8 Jun 2001 [EMAIL PROTECTED] wrote: > > You get this warning because $action is undefined. Comparing undefined value > > with something is usually unwanted, so it produces a warning. > > > > You could rewrite it to: > > if (defined($action) && ($action eq 'add')) { > > > > or assign somet

Re: Use of uninitialized value in string eq at ./adpanel.pl line37.

2001-06-08 Thread iansmith
On Fri, 8 Jun 2001 [EMAIL PROTECTED] wrote: > why is $action undefined? i use my $action; earlier in the script > and i thought that the statement $action = $formdata{action}; > would take care of assigning a value to $action so that it would > not be undefined. If formdat

Re: Use of uninitialized value in string eq at ./adpanel.pl line37.

2001-06-08 Thread charles
> > You get this warning because $action is undefined. Comparing undefined value > with something is usually unwanted, so it produces a warning. > > You could rewrite it to: > if (defined($action) && ($action eq 'add')) { > > or assign something meaningful to $action before you use it. > >

Re: Use of uninitialized value in string eq at ./adpanel.pl line37.

2001-06-08 Thread charles
even when defining it as my %formdata; i still get the same error. i believe that i have tried it as my %formdata; my $formdata; the only other variable reference in that line is to $action, which has a my statement. On Fri, 8 Jun 2001, Peter Cline wrote: > At 09:29 AM 6/8/01 -0500, you w