Charles-

Without seeing the rest of the code, I can only guess, but...

Somewhere between this line:

        my $action;

and this one:

        if ( $action eq "add" ) {               <-- line 37

should be a statement setting the value of '$action'.  My guess is that the
statement setting '$action' to some value is a variation of an
'if-then-else' statement:

        if ( $ARGV[0] == 'add' ) { $action = 'add'; }
        elsif ( $ARGV[0] == 'delete' ) { $action = 'delete'; }

If the $ARGV[0] is neither 'add' nor 'delete', $action is not initialized.
Its value remains NULL.  This is necessarily bad, but the -w switch will
warn you with 

        Use of uninitialized value in string eq at ./adpanel.pl line 37.

Check your logic to ensure that you are correctly setting $action.

Hope this helps.

Dennis
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 08, 2001 7:29 AM
To: Perl Discuss
Subject: Use of uninitialized value in string eq at ./adpanel.pl line
37.


I am getting:

  Use of uninitialized value in string eq at ./adpanel.pl line 37.

even though my line 37 appears as:


if ( $action eq "add" ) {               <-- line 37
  $add_alias = $formdata{alias};
  $add_destination = $formdata{destination};
  $add_tag = 1;

}


earlier in the script, i have

my $action;
my $add_alias;
my $add_destination;
my $add_tag;

do i need to define my $formdata?

Reply via email to