in reply to Re: undef==defined sometimes? (body question)
in thread undef==defined sometimes?

As such, it appears that defined imposes a scalar context on its argument. An array name in scalar context is the number of elements in that array. Numbers are defined, so defined(@bar) always returns true.
Nope. defined() on arrays or hashes is special; it returns whether they've ever had storage allocated for elements. But because this has historically been misused (as in the OPs case), this behavior was deprecated in 5.6.0, and Linda should have seen a deprecated warning. See defined.
  • Comment on Re^2: undef==defined sometimes? (body question)