uninitialized value in concatenation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • samthemist
    New Member
    • Jul 2007
    • 34

    uninitialized value in concatenation

    When perl comes out with errors like this:

    Use of uninitialized value in concatenation (.) or string at NQII.pl line 18, <STDIN> line 2.
    Argument "" isn't numeric in numeric ne (!=) at NQII.pl line 342, <STDIN> line 2.
    Argument "neopets.co m/hi.phtml" isn't numeric in numeric ne (!=) at NQII.pl line 342, <STDIN> line 2.
    Argument "POST" isn't numeric in numeric eq (==) at NQII.pl line 343, <STDIN> line 2.
    Argument "POST" isn't numeric in numeric eq (==) at NQII.pl line 343, <STDIN> line 2.
    Use of uninitialized value in concatenation (.) or string at NQII.pl line 355, <STDIN> line 2.
    Use of uninitialized value in pattern match (m//) at NQII.pl line 391, <sock> line 22.

    Does that make it slower? And any tips for getting rid of these errors?
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    Well, troubleshooting Perl is typically a process of elimination (IMHO). I usually start with the most obvious error, which in this case would be "Use of uninitialized value in concatenation (.) or string at NQII.pl line 18, <STDIN> line 2".

    This tells me that in your script, you have a variable being referenced that is not set when it is used. This could be caused by any number of situations, but for me, it has happened when the variable was out of scope.

    If you posted your code here, we could help you troubleshoot it and guide you to getting it working.

    Regards,

    Jeff

    Comment

    • samthemist
      New Member
      • Jul 2007
      • 34

      #3
      It works fine actually - with no errors to stop it. Though i was wondering if these little errors make it slower? Or do they have no affect at all on the speed?

      Comment

      • KevinADC
        Recognized Expert Specialist
        • Jan 2007
        • 4092

        #4
        these are not errors, they are warnings. I would certainly try and fix them and see if it helps increase the execution time of your script. Once they are all fixed you can disable warnings and see if that also helps.

        Comment

        • samthemist
          New Member
          • Jul 2007
          • 34

          #5
          Originally posted by KevinADC
          these are not errors, they are warnings. I would certainly try and fix them and see if it helps increase the execution time of your script. Once they are all fixed you can disable warnings and see if that also helps.
          I don't particularly want to post the whole script here, think i could PM you it?

          Comment

          • KevinADC
            Recognized Expert Specialist
            • Jan 2007
            • 4092

            #6
            Please do not PM me your script. Maybe someone else will take a look at your code and help you debug it, but I don't want to.

            Comment

            • samthemist
              New Member
              • Jul 2007
              • 34

              #7
              Originally posted by KevinADC
              Please do not PM me your script. Maybe someone else will take a look at your code and help you debug it, but I don't want to.
              Fair enough.

              .....

              Comment

              Working...