Don't ask to ask, just ask | |
PerlMonks |
Re: Looking for less codeby mzedeler (Pilgrim) |
on Aug 11, 2009 at 10:38 UTC ( [id://787580]=note: print w/replies, xml ) | Need Help?? |
The comment by JavaFan provides a very short version, but that aside, having a variable named $flag is a really bad idea. Usually you use the name to describe the purpose of the variable, not the type. Otherwise you'll end up with names like $string, $string2, $number, $numbers and so forth. Knowing what you want $flag to do could in this case help simplifying your code even further.
In Section
Seekers of Perl Wisdom
|
|