|Keep It Simple, Stupid|
Re^3: Scalar Value Not Available To Subroutineby BrowserUk (Pope)
|on Dec 20, 2012 at 18:04 UTC||Need Help??|
Seems so. Effectively, the loop variable has no relationship with any pre-existing variable with the same name:
I believe it is a throw-over from pre-lexical Perl.
I've often wished (and occasionally argued in favour of), that for didn't localise pre-existing, lexical loop variables.
It makes for messy workarounds to the situation where a counting loop can exit early conditionally, and you want to know how far it counted:
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.