Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Most Annoying Error : Use of uninitialized value in concatenation (.) or string at C:\Perl\O

by blazar (Canon)
on Jul 15, 2005 at 10:35 UTC ( #475167=note: print w/ replies, xml ) Need Help??


in reply to Most Annoying Error : Use of uninitialized value in concatenation (.) or string at C:\Perl\O

I didn't read your post, but from the subject line I guess that if you're really sure 'bout what you're doing, then the usual cure -and thus the one you're after- is

{ no warnings 'uninitialized'; # Offending code here }
PS: it's not an error. It's a warning!


Comment on Re: Most Annoying Error : Use of uninitialized value in concatenation (.) or string at C:\Perl\O
Download Code
Re^2: Most Annoying Error : Use of uninitialized value in concatenation (.) or string at C:\Perl\O
by blackadder (Hermit) on Jul 15, 2005 at 10:59 UTC
    Thanks,...Can I ask why didn't you read my post?

    Blackadder
      Because of a synergy between those virtues called lazyness and impatience on the one hand and the fact that I presumed the subject to say it all (also, it was very lengthy at first sight) on the other one.

      And giving this this answer I kinda think I exercised hubris too, didn't I? ;-)

Re^2: Most Annoying Error : Use of uninitialized value in concatenation (.) or string at C:\Perl\O
by dbwiz (Curate) on Jul 15, 2005 at 11:11 UTC
    I didn't read your post

    Perhaps you should have.

    its not an error. It's a warning!

    That's right. It's a warning that is telling the OP that something might be wrong.

    By telling him to blindly remove the warning, you are removing the only clue he might have to find out why the program did not behave as expected.

    The right thing to do in these cases is to either inspect the data or apply tome sanitizing methods to make the data consistent.

      Did you notice that I wrote "if you're really sure 'bout what you're doing" in strong tags?!? I have strict and warnings turned on all the time. But that's the single warning that every now and again can be safely turned off locally.

      Did you also notice that I specifically instructed him to do that in a lexical scope with a code sample suggesting to do that around a single line of code?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (13)
As of 2014-07-30 08:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls