in reply to &imagine...

I have a minor and annoying nit to pick ...

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
    not @religions would impose scalar context without the explicit call to scalar.

    Caution: Contents may have been coded under pressure.
      I stand corrected :) Thanks!