in reply to Re: Do not undertand this error message
in thread Do not undertand this error message

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re^2: Do not undertand this error message

Replies are listed 'Best First'.
Re^3: Do not undertand this error message
by jhourcle (Prior) on Apr 29, 2005 at 11:35 UTC

    The print <<EOF; is effectively a double quoted string.

    Somewhere in there, one of the variables that's in the string is undefined. The easiest thing to try to pinpoint exactly where it is, is to break the string down into smaller parts. (split in half or thirds, figure out which part had the problem, split that one down further, etc.)

    As you're getting the values from an HTTP form submission, you can't be sure that the browser sent the value, so in the long run, I'd also suggest handling that possibility:

    $player = param("player") || ''; $playerphone = param("playerphone") || ''; ...

    (you'll want more sophisticated logic if '0' is a valid value for that field)

Re^3: Do not undertand this error message
by gellyfish (Monsignor) on Apr 29, 2005 at 11:25 UTC

    No, no, no. YOu don't understand, the message you are getting is as the result of trying to interpolate an undefined scalar into a double quoted string - this may be in an explicit "string" or within one of your "here documents". A missing double quote would result in a compile time error.

    /J\

Re: Do not undertand this error message
by jonadab (Parson) on Apr 29, 2005 at 11:47 UTC

    Look for sigils. Any place (in the string) where there's a $ or @, for instance, Perl will attempt to interpolate the corresponding variable.

    When I run it at the command line, I get this:

    Content-Type: text/html; charset=ISO-8859-1 <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-U +S"><head><title> </title> [Fri Apr 29 07:36:15 2005] temp.pl: Use of uninitialized value in stri +ng eq at temp.pl line 36. [Fri Apr 29 07:36:15 2005] temp.pl: Use of uninitialized value in stri +ng eq at temp.pl line 36. [Fri Apr 29 07:36:15 2005] temp.pl: Use of uninitialized value in stri +ng eq at temp.pl line 36. [Fri Apr 29 07:36:15 2005] temp.pl: Use of uninitialized value in conc +atenation (.) or string at temp.pl line 54. </head><body><p>Logic error, unknown choice: </p>/root #

    In this case, it appears to be $choice and $payment that are undefined, causing these warnings. However, the one you are getting comes from a different place in the code, and so it may be a different variable.

    If you can't figure out where it is by looking at the code, I know two tricks to narrow it down:

    1. Use Data::Dumper to show you what your various variables really are; look for ones that are undef and should be defined.
    2. Failing that, split up your big long string into pieces. Start by splitting it in half, then when you run again the line number will tell you which half is the problem; split that half in half again, and repeat until you've got a string with just one interpolation in it; there is your problem.

    "In adjectives, with the addition of inflectional endings, a changeable long vowel (Qamets or Tsere) in an open, propretonic syllable will reduce to Vocal Shewa. This type of change occurs when the open, pretonic syllable of the masculine singular adjective becomes propretonic with the addition of inflectional endings."  — Pratico & Van Pelt, BBHG, p68
      Hello,

      I verified whether my values are being passed from the form to the script. And, they are. I know this because I receive a confirmation email with all the values I entered into the form in the email. So all my parameters are working fine.

      So I don't know what else it could be.
        if you change this
        my ( $player, $playerphone, $entry, $message, $memberid, $email, $part +ner, $partnerphone, $section, $level, $street, $city, $state, $zip, $ +party, $guests, $payment );
        to this
        my ( $player, $playerphone, $entry, $message, $memberid, $email, $part +ner, $partnerphone, $section, $level, $street, $city, $state, $zip, $ +party, $guests, $payment ) = ("","","","","","","","","","","","","", +"","","", "");
        does it go away?

        Update:
        Apologies, meant to also say to comment out the reassignment.

        Update::
        Added $payment
        ... all my parameters are working fine.

        In that case, I'm afraid you'll have to split up the long heredoc string into pieces to track down which part of it has the problem.