|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Re: A Case with 5 Var'sby GrandFather (Cardinal) |
| on Jan 25, 2007 at 11:10 UTC ( #596449=note: print w/ replies, xml ) | Need Help?? |
|
A neat trick that may, or may not, help (depending on what you are trying to achieve) is to generate a bit vector:
which sets a bit in $vector for each "true" variable. As a bonus it sets the least significant bit if any of the variables is false. Note BTW that there is a big difference between defined and "true". The sample prints:
DWIM is Perl's answer to Gödel
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||