Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: Re: Uninitialized Value Warning

by thelenm (Vicar)
on Oct 22, 2003 at 23:06 UTC ( #301416=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Uninitialized Value Warning
in thread Uninitialized Value Warning

It basically means you used a variable with the value undef in a string concatenation (which is what string interpolation does under the covers)... er, array index in this case, but the warning is emitted whenever an undefined value is used as if it were already defined. "Uninitialized" may be a little misleading because you can still get this warning even if the variable has had a value assigned to it before:

use warnings; my $str = 'foo'; print "$str\n"; # ok $str = undef; print "$str\n"; # emits "uninitialized" warning

By the way, you can see detailed explanations of pretty much all Perl warnings by checking out the perldiag documentation (run perldoc perldiag).

-- Mike

--
XML::Simpler does not require XML::Parser or a SAX parser. It does require File::Slurp.
-- grantm, perldoc XML::Simpler


Comment on Re: Re: Re: Uninitialized Value Warning
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2014-12-17 20:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (31 votes), past polls