Using scalar function to get the array length : Array Length « Array « Perl
- Perl
- Array
- Array Length
Using scalar function to get the array length
@array = (1, 2, 3);
print "\@array has " . scalar(@array) . " elements.";
Related examples in the same category