Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Perl Programming/Keywords/values

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Perl utime vec Keywords 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 @array. The values are returned as call-by-reference, so any modification to the elements would change the object content. From Perl 5.14 onwards, values can evaluate an EXPRESSION that should have the reference to an unblessed hash. Syntax values HASH values ARRAY values EXPRESSION Examples %hash = (foo => 11, bar => 22, baz => 33); for (values %hash) { print; } 223311 See also keys Perl utime vec Keywords