Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Flag variablesby allolex (Curate) |
on Mar 03, 2003 at 22:20 UTC ( [id://240173]=note: print w/replies, xml ) | Need Help?? |
Maybe wiser heads than mine have posted here, but if you're dying to use flags, you could use constants. So here's an answer to your third question.
And then keep track of it with a status/state variable. That at least makes the code easier to read: $state = PRINTFLAG;, instead of just a number. Of course, it's really only approporiate where multiple states come into question.
--
In Section
Seekers of Perl Wisdom
|
|