On lördag, maj 10, 2003, at 00:41 Europe/Stockholm, Dave Mitchell wrote: > Currently, code like the following produces the warning shown: > > $ perl -wle 'my $x=1; my $y; print $x+$y' > Use of uninitialized value in addition (+) at -e line 1. > 1 > > When the code is more complicated, it becomes very irritating that > Perl doesn't tell you the name of the variable that had the undef > value. > > I include a proof-of-concept patch below (not to be applied !!!!) > that produces the following warning instead: > > Use of uninitialized variable $y in addition (+) at -e line 1. IMHO, the message should read "Use of uninitialized value $y in addition (+) at -e line 1." instead, since there might be folks out there who as a __WARN__ signal handles that looks for "Use of initialized value" in the warning. /Claes J.Thread Previous