Don't ask to ask, just ask | |
PerlMonks |
Re: Selectively coloring a menu's item membersby GrandFather (Saint) |
on Sep 01, 2007 at 00:01 UTC ( [id://636449]=note: print w/replies, xml ) | Need Help?? |
General rule: declare variables in the smallest scope possible. In this case:
avoids your problem which is due to using a global (to the loop) variable instead of a temporary variable. DWIM is Perl's answer to Gödel
In Section
Seekers of Perl Wisdom
|
|