From: Rafael Garcia-Suarez Date: Mon, 3 Nov 2003 15:33:55 +0000 (+0000) Subject: Document the fact that keys() and values() are optimized X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2f65b2f0bd345fd58390bf7bbb7e2f9c96839f76;p=p5sagit%2Fp5-mst-13.2.git Document the fact that keys() and values() are optimized for void context (as suggested by Liz.) p4raw-id: //depot/perl@21644 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 4a1b404..2dbe740 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -2325,7 +2325,8 @@ Perl for security reasons (see L). As a side effect, calling keys() resets the HASH's internal iterator, -see L. +see L. (In particular, calling keys() in void context resets +the iterator with no other overhead.) Here is yet another way to print your environment: @@ -6297,7 +6298,8 @@ function would produce on the same (unmodified) hash. Since Perl for security reasons (see L). As a side effect, calling values() resets the HASH's internal iterator, -see L. +see L. (In particular, calling values() in void context resets +the iterator with no other overhead.) Note that the values are not copied, which means modifying them will modify the contents of the hash: