Cliff Rayman wrote:
>
> `perldoc -f defined` yields a couple of sentences:
>
> You may also use C<defined()> to check whether a subroutine exists, by
> saying C<defined &func> without parentheses. On the other hand, use
> of C<defined()> upon aggregates (hashes and arrays) is not guaranteed to
> produce intuitive results, and should probably be avoided.
I hate it when that happens.
> why not use:
>
> if(@foo_in)
>
> instead of:
>
> if (defined @foo_in)
Yeah. I guess the reason I do the latter is b/c I want the code to
reflect what I am actually trying to test. I don't really want to test
the trueness of @foo, I want to test for it's existence. But in perl
the operation is overloaded. Feh.
I think I will test for defined $foo_in[0] instead.
--
Jeffrey W. Baker * [EMAIL PROTECTED]
Critical Path, Inc. * we handle the world's email * www.cp.net
415.808.8807