On Tue, Jan 28, 2014 at 04:02:50AM -0000, Father Chrysostomos wrote: > Dave Mitchell wrote: > > In that case, the only thing your change would affect is that any warnings > > that were generated post your change that affected the first 'my' would appear > > to come from the later 'my'; e.g. > > > > my $x; # a warning here appears to come from line 2 rather than line 1 > > my $y; > > > > but I doubt there are any such warnings. > > $ perl -we 'my $x; my $x; my $y' > "my" variable $x masks earlier declaration in same scope at -e line 1. But that warning is generated at compile time, before the peephole optimiser has run; so the line number will be reported ok. -- Any [programming] language that doesn't occasionally surprise the novice will pay for it by continually surprising the expert. -- Larry WallThread Previous | Thread Next