LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: comdog@cvs.perl.org Date: Sat Aug 16 00:33:24 2008 Subject: [svn:perlfaq] r11653 - perlfaq/trunk
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 ) ) {
| Navigate in group perl.cvs.perlfaq at sever nntp.perl.org | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by PHP Developer
Powered By PHP Consultants |