in reply to Re: for loop localisation bug?
in thread for loop localisation bug?

That's essentially what he did. $n is uninitialized before and after the loop, but not during. This doesn't change if $n was set to a value (other than the lack of an Unitialized warning).

Output from my test (in which I changed my $n; to my $n = 255;):

Perl version is: 5.008001 50 The value of the counter after the loop is 255