in reply to &imagine...
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: &imagine...
by Roy Johnson (Monsignor) on Sep 28, 2005 at 13:12 UTC | |
by grimborg (Sexton) on Sep 28, 2005 at 14:30 UTC |