values() Function in
Perl returns the list of all the values stored in a Hash. In a scalar context it returns the number of elements stored in the Hash.
Note: Values returned from the value() Function may not always be in the same order.
Syntax: values Hash
Returns: list of values in the list context and number of values in the scalar context
Example 1:
Output:
Values in the Hash are A-B-10-20
Number of values in Hash are: 4
Example 2:
Output:
Values in the Hash are Welcome-World-to-Geeks
Number of values in Hash are: 4