in reply to Re: Check if array is null
in thread Check if array is null

perldoc -f defined
Use of "defined" on aggregates (hashes and arrays) is
deprecated. It used to report whether memory for that aggregate
has ever been allocated. This behavior may disappear in future
versions of Perl. You should instead use a simple test for size:

    if (@an_array) { print "has array elements\n" }
    if (%a_hash)   { print "has hash members\n"   }

Replies are listed 'Best First'.
Re^3: Check if array is null
by Limbic~Region (Chancellor) on Oct 06, 2004 at 15:35 UTC
    Anonymous Monk,
    Thanks for another example of the importance of learning to fish - RTFMing. It also points out that no matter how good of a fisherman we think we are - there is always more to learn.

    Cheers - L~R