in not $#religions and all the other places where you use $#, $#foo evaluates to the index of the last element in the array @foo, or -1 if the array is empty. -1 is true. You probably wanted scalar(@foo) which evaluates to the number of elements in the array - that is, 0 (false) for an empty array of religions.
It wouldn't scan so well though.
In reply to Re: &imagine...
by DrHyde
in thread &imagine...
by grimborg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |