develooper Front page | perl.perl5.porters | Postings from March 2000

Re: [ID 20000330.052] Use of uninitialized value in concatenation (.)

From:
Ronald J Kimball
Date:
March 31, 2000 08:32
Subject:
Re: [ID 20000330.052] Use of uninitialized value in concatenation (.)
Message ID:
20000331113213.D185428@linguist.dartmouth.edu
On Fri, Mar 31, 2000 at 09:21:54AM -0700, Tom Christiansen wrote:
> >I would prefer your Option #2, "... in concatenation (.) or interpolation
> >... "
> 
> % perl -lwe '@a[0,2] = (0,2); print "@a $a", "$a", $a'
> Use of uninitialized value in join at -e line 1.
> Use of uninitialized value in concatenation (.) at -e line 1.
> Use of uninitialized value in string at -e line 1.
> Use of uninitialized value in print at -e line 1.

Ick...  That does make a difference in what to do about the possible
confusion.

So, if the warning were changed, that would be more like:

% perl -lwe '@a[0,2] = (0,2); print "@a $a", "$a", $a'
Use of uninitialized value in join/string at -e line 1.
Use of uninitialized value in concatenation (.)/string at -e line 1.
Use of uninitialized value in string at -e line 1.
Use of uninitialized value in print at -e line 1.


Are there other warnings, besides "Use of uninitialized value", that
specify an operator?  Perhaps a patch to perldiag that explains this issue
would be preferred?


Ronald



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About