Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Use of uninitialized value in concatenation (.) or string

by mikeraz (Friar)
on Apr 15, 2010 at 15:07 UTC ( #834909=perlquestion: print w/ replies, xml ) Need Help??
mikeraz has asked for the wisdom of the Perl Monks concerning the following question:

Well this should be a no brainer:

Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/5.8.5/Net/OUR/DNS.pm line 139 (#1) Where: 139 print __LINE__, " our_fqdn called with $host state_code $state_cod +e and thus region of $region_code \n"; Outputs: 139 our_fqdn called with scdor44s4q1rr.nw.us.our-dns.com state_code OR + and thus region of NW
All the values are being printed, indicating to my mind that they were initialized. But Perl says otherwise.

Cluestick whack requested.


Be Appropriate && Follow Your Curiosity

Comment on Use of uninitialized value in concatenation (.) or string
Download Code
Re: Use of uninitialized value in concatenation (.) or string
by choroba (Abbot) on Apr 15, 2010 at 15:20 UTC
    Strange indeed. Can you show neighbouring lines in the code and in the output as well?
Re: Use of uninitialized value in concatenation (.) or string
by cdarke (Prior) on Apr 15, 2010 at 15:31 UTC
    The line shown appears to be correct - I tried it with values for the variables. So, I hate to ask the basic questions but it has got to come down to one of these:
    1. Are you using warnings and strict? If you are not using strict then you might wish to consider setting it on as a test using -Mstrict on the command-line.
    2. Are you certain that the line you show is really the line it is reporting the error on? Could it be using a different version of the module?

    By the way, 5.12 reports the variable name that is uninitialized.
Re: Use of uninitialized value in concatenation (.) or string
by ikegami (Pope) on Apr 15, 2010 at 15:31 UTC
    Maybe the warning isn't coming from that line, or maybe it's coming from a different run of that line.

      That appears to be the case. The debug messages were popping up out of sync with the calling program print statements.

      Thank you.


      Be Appropriate && Follow Your Curiosity

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://834909]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (12)
As of 2014-07-30 16:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (235 votes), past polls