Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't Perl 5 tell you the name of the variable when it complains about uninitialized values?

Tags:

perl

Why doesn't Perl 5 give me the name of the variable it is complaining about?

perl5.8.9 -we 'my $u; print "$u\n"'
Use of uninitialized value in concatenation (.) or string at -e line 1.
like image 878
Chas. Owens Avatar asked Sep 03 '10 17:09

Chas. Owens


1 Answers

It has since version 5.10 which was released in 2007, it is time to upgrade (5.12.2 is coming out shortly).

perl5.10.0 -we 'my $u; print "$u\n"'
Use of uninitialized value $u in concatenation (.) or string at -e line 1.
like image 90
Chas. Owens Avatar answered Nov 15 '22 03:11

Chas. Owens