 |
|
Home:
Perl Programming Help:
Regular Expressions:
How to check for an empty array in perl?:
Edit Log
|
|

iphone
User
Dec 20, 2010, 11:20 PM
Views: 2685
|
|
How to check for an empty array in perl?
|
|
|
Does the following work or is there a better way?
@array = {1,2,3}; #print "ARRAY @array"; if (!@array) { } foreach my $base_p4path (@array)#I want this for loop to get executed only when @array has elements. { }
(This post was edited by iphone on Dec 21, 2010, 12:21 AM)
|
|
|
Edit Log:
|
|
Post edited by iphone
(User) on Dec 20, 2010, 11:20 PM
|
|
Post edited by iphone
(User) on Dec 21, 2010, 12:21 AM
|
|
Post edited by iphone
(User) on Dec 21, 2010, 12:21 AM
|
|
|  |