> [EMAIL PROTECTED] - Thu Mar 30 21:52:59 2000]: > > Shouldn't > > perl5.6.0 -we 'my $x; our $x; $x=0' > > generate some sort of "redeclared" warning? The other cases > (two "my"s or two "our"s or "our" before "my") all do.
This is still an issue in 5.9.x. I'd agree, there should be a warning particularly because all other combinations issue a warning: $ bleadperl -lwe 'my $x = 42; our $x = 23; print $x' 23 $ bleadperl -lwe 'my $x = 42; my $x = 23; print $x' "my" variable $x masks earlier declaration in same scope at -e line 1. 23 $ bleadperl -lwe 'our $x = 42; my $x = 23; print $x' "my" variable $x masks earlier declaration in same scope at -e line 1. 23 $ bleadperl -lwe 'our $x = 42; our $x = 23; print $x' "our" variable $x masks earlier declaration in same scope at -e line 1. 23 > And is it appropriate that > > perl5.6.0 -we 'our $x' > > generates a "used only once", but the corresponding "my" does not? This appears to have been resolved.