Don't ask to ask, just ask | |
PerlMonks |
Re: array testingby erasei (Pilgrim) |
on Oct 30, 2003 at 15:31 UTC ( [id://303280]=note: print w/replies, xml ) | Need Help?? |
You want to use the 'defined' function to test if your array contains anything. 'defined' will return true if the array has any elements, and will return false if it is A: not defined at all, or B: defined null (@arr = () returns false).
will print only:
In Section
Seekers of Perl Wisdom
|
|