X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlfaq4.pod;h=3200e7aca48e6c021172385b869788702eecee15;hb=0c42fe95656e99f238a0bcf90ab2476c175615b7;hp=e660042205d734916b79a7520f7cabb87a510df1;hpb=c195e131167b24ce65760dbc38d744bc87427feb;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlfaq4.pod b/pod/perlfaq4.pod index e660042..3200e7a 100644 --- a/pod/perlfaq4.pod +++ b/pod/perlfaq4.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq4 - Data Manipulation ($Revision: 10126 $) +perlfaq4 - Data Manipulation ($Revision: 10394 $) =head1 DESCRIPTION @@ -2071,10 +2071,16 @@ end up doing is not what they do with ordinary hashes. =head2 How do I reset an each() operation part-way through? -Using C in scalar context returns the number of keys in -the hash I resets the iterator associated with the hash. You may -need to do this if you use C to exit a loop early so that when -you re-enter it, the hash iterator has been reset. +(contributed by brian d foy) + +You can use the C or C functions to reset C. To +simply reset the iterator used by C without doing anything else, +use one of them in void context: + + keys %hash; # resets iterator, nothing else. + values %hash; # resets iterator, nothing else. + +See the documentation for C in L. =head2 How can I get the unique keys from two hashes? @@ -2288,9 +2294,9 @@ the C module from CPAN instead--it makes number-crunching easy. =head1 REVISION -Revision: $Revision: 10126 $ +Revision: $Revision: 10394 $ -Date: $Date: 2007-10-27 21:29:20 +0200 (Sat, 27 Oct 2007) $ +Date: $Date: 2007-12-09 18:47:15 +0100 (Sun, 09 Dec 2007) $ See L for source control details and availability.