Google News
logo
Perl - Interview Questions
How to find the length of an array in Perl?
Size of an array is determined with scalar context on the array. Array length will always be one greater than its largest index.
 
Perl size = $#arrayName +
 
Where $#arrayName is the maximum index of the array.
Advertisement