Perl Programming/Keywords/values

The values keyword
values returns a list of all the values of the named HASH, when called in list context. Using Perl 5.12 or later, it will also return a list of the ARRAY. Older versions would produce a syntax error. If called in scalar context, values returns the number of values in the object.

A side effect is that any call on an ARRAY or a HASH will reset the internal iterator of the object. If called in void context resets only the iterator. In list context, values @array is the same as <tt>@array</tt>.

The values are returned as call-by-reference, so any modification to the elements would change the object content.

From Perl 5.14 onwards, <tt>values</tt> can evaluate an <tt>EXPRESSION</tt> that should have the reference to an unblessed hash.

Examples
223311