Problems? Is your data what you think it is? | |
PerlMonks |
Re: array check helpby DigitalKitty (Parson) |
on May 16, 2003 at 20:00 UTC ( [id://258751]=note: print w/replies, xml ) | Need Help?? |
Hi Anonymous Monk,
The easiest method to determine if an array is empty is to analyze the value it 'equates' to ( true or false ).
The line if( @array ) is essentially saying 'if the array has a true value'...if it were empty, it would equal false. You can delete all the elements of an array of by assigning a empty list to it:
Hope this helps, -Katie.
In Section
Seekers of Perl Wisdom
|
|