Google News
logo
Perl - Quiz(MCQ)
How will you get the size of a Hash?
A)
Using scalar context
B)
using sizeof operator
C)
Both (A) and (B)
D)
None of the above.

Correct Answer :   Using scalar context


Explanation : You can get the size − that is, the number of elements from a hash by using the scalar context on either keys or values.

Advertisement