Name

values

Synopsis

values %hash
                  

Returns a list consisting of all the values of the named hash. The values are returned in an apparently random order, but it is the same order that the keys or each function would produce on the same hash. To sort the hash by its values, see the example under keys . Note that using values on a hash bound to a very large DBM file will produce a very large list, causing you to have a very large process, and leaving you in a bind. You might prefer to use the each function, which will iterate over the hash entries one by one without reading them all into a single list.

Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.