in reply to Re: foreach my $var scope oddness
in thread foreach my $var scope oddness

<nitpick>Actually "is an alias to", not "is a reference". The loop variable doesn't get dereferenced to access the current element - it is in essence the current element.</nitpick>

I find it better to refer to it as the "loop variable" rather than the "index variable". In Perl it is seldom an index and even when it is, it is still the "loop variable" and is aliased to each list item in turn.


DWIM is Perl's answer to Gödel