Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^4: Lexical closuresby GrandFather (Saint) |
on Oct 25, 2008 at 19:48 UTC ( [id://719541]=note: print w/replies, xml ) | Need Help?? |
I invariably write:
so I am reminded of the scope of the loop variable and am not tempted to think of it having larger scope. A very good rule to follow is to always declare lexical variables in the smallest scope possible which precludes declaring declaring loop variables outside the for loop scope Perl reduces RSI - it saves typing
In Section
Seekers of Perl Wisdom
|
|