in reply to Re: Is there a better way to check if an array is empty?
in thread Is there a better way to check if an array is empty?

If you have one defined element in array then array not empty!
my $r='undefined'; foreach my $t (@a) { if ($t) {$r='defined';last} } print $r;