Skip navigation.
Home
Your source for Perl tips, howto's, faq and tutorials
( categories: )

Use the array in scalar context to get the size (number of elements) of the array. To force an array to be evaluated in scalar context, use the scalar operator.

Example:

print "Size of array is " . scalar @array;