my $r='undefined'; foreach my $t (@a) { if ($t) {$r='defined';last} } print $r;
In reply to Re^2: Is there a better way to check if an array is empty?
by Khariton
in thread Is there a better way to check if an array is empty?
by iphone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |