[svn:perlfaq] r11653 - perlfaq/trunk
[email protected] Fri, 15 Aug 2008 23:33:24 -0700 (PDT)
| Newsgroups | perl.cvs.perlfaq |
|---|---|
| Message-ID | <[email protected]> |
Author: comdog
Date: Fri Aug 15 23:33:23 2008
New Revision: 11653
Modified:
perlfaq/trunk/perlfaq4.pod
Log:
* perlfaq4: How do I process an entire hash?
+ fix typoes
Modified: perlfaq/trunk/perlfaq4.pod
==============================================================================
--- perlfaq/trunk/perlfaq4.pod (original)
+++ perlfaq/trunk/perlfaq4.pod Fri Aug 15 23:33:23 2008
@@ -1934,7 +1934,7 @@
}
Once you have the list of keys, you can process that list before you
-process the hashh elements. For instance, you can sort the keys so you
+process the hash elements. For instance, you can sort the keys so you
can process them in lexical order:
foreach my $key ( sort keys %hash ) {
@@ -1952,7 +1952,7 @@
}
If the hash is very large, you might not want to create a long list of
-keys. To save some memory, you can grab on key-value pair at a time using
+keys. To save some memory, you can grab one key-value pair at a time using
C<each()>, which returns a pair you haven't seen yet:
while( my( $key, $value ) = each( %hash ) ) {