Home »
MCQs »
Perl Programming MCQs
Which is a valid way to extract the size of an array in Perl?
89. Which is a valid way to extract the size of an array in Perl?
- _len(@array_name)
- @array_name.length()
- $size = scalar @array_name
- All of these
Answer: C) $size = scalar @array_name
Explanation:
The valid way to extract the size of an array in Perl is:
$size = scalar @array_name