Does the following work or is there a better way?
@array = {1,2,3}; #print "ARRAY @array"; if (!@array) { print "ARRAY IS EMPTY\n"; } foreach my $base_p4path (@array)#I want this for loop to get executed +only when @array has elements. { }
In reply to Is there a better way to check if an array is empty? by iphone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |