I want this for loop to get executed only when @array has elements.Then no check is needed.
foreach my $base_p4path (@array) { # Execute once for each element in @array. # Hence *NO* loop iteration if @array is empty. }
In reply to Re: Is there a better way to check if an array is empty?
by JavaFan
in thread Is there a better way to check if an array is empty?
by iphone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |