On Wed Sep 28 21:01:34 2016, aristotle wrote: > * Mark-Jason Dominus <perlbug-followup@perl.org> [2016-09-29 03:00]: > > Also, when correcting that bug, please make sure this is also > > corrected: > > > > for my $i (1..3) { > > sub announce { printf "Count %d\n", $i } > > announce(); > > } > > > > It shows the same wrong behavior. > > That sub is compiled just once despite its placement inside the loop > and > it binds $i at compile time. This is similar to the problem that plagues lexical aliasing. The notes I added in 514e62e37b8 may also be relevant to package subs, but I do not have time to think it through now, or in the foreseeable future. -- Father Chrysostomos --- via perlbug: queue: perl5 status: open https://rt.perl.org/Ticket/Display.html?id=129757Thread Previous