Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: How do I test if an array is empty or not?by merlyn (Sage) |
on Nov 12, 2000 at 16:42 UTC ( [id://41181]=note: print w/replies, xml ) | Need Help?? |
The name of the array (like @a) in a scalar context yields the number of elements currently in the array. And a boolean test selects scalar context automatically, so something like:
should work just fine.
In Section
Seekers of Perl Wisdom
|
|