We don't bite newbies here... much | |
PerlMonks |
Re: Flag variablesby robartes (Priest) |
on Mar 03, 2003 at 10:57 UTC ( [id://239996]=note: print w/replies, xml ) | Need Help?? |
I would say it detracts from code clarity and locality (sp?): your someaction depends on some other piece of code (the conditional setting of $flag) which could be several lines away. If all you want to do is someaction, the $flag is totally superfluous - just do the action directly:
More learned minds than mine will undoubtedly come up with other reasons why flag variables are often "bad". CU
In Section
Seekers of Perl Wisdom
|
|