In perl.git, the branch blead has been updated
http://perl5.git.perl.org/perl.git/commitdiff/f5a93a43fe9802cca88dfd56d68a220ec6625118?hp=899e5457ebe2dcf2d30225838d4b76e63283b67c
- Log -
commit f5a93a43fe9802cca88dfd56d68a220ec6625118
Author: Tom Christiansen tchr...@perl.com
Date: Wed May 4 09:49:46 2011 -0400
Updates to perlfunc to explicitly mention some of 5.14's new features
somewhere other than perldelta.
---
Summary of changes:
pod/perlfunc.pod | 87 +++---
1 files changed, 50 insertions(+), 37 deletions(-)
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 3e49e2a..2a1b20a 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -1473,6 +1473,8 @@ Xeach Xhash, iterator
=item each ARRAY
Xarray, iterator
+=item each EXPR
+
When called in list context, returns a 2-element list consisting of the key
and value for the next element of a hash, or the index and value for the
next element of an array, so that you can iterate over it. When called in
@@ -1509,10 +1511,10 @@ but in a different order:
print $key=$value\n;
}
-Starting with Perl 5.14, Ceach can take a reference to an unblessed hash
-or array. The argument will be dereferenced automatically. This aspect of
-Ceach is considered highly experimental. The exact behaviour may change
-in a future version of Perl.
+Starting with Perl 5.14, Ceach can take a scalar EXPR, which must hold
+reference to an unblessed hash or array. The argument will be dereferenced
+automatically. This aspect of Ceach is considered highly experimental.
+The exact behaviour may change in a future version of Perl.
while (($key,$value) = each $hashref) { ... }
@@ -2643,6 +2645,8 @@ Xkeys Xkey
=item keys ARRAY
+=item keys EXPR
+
Returns a list consisting of all the keys of the named hash, or the indices
of an array. (In scalar context, returns the number of keys or indices.)
@@ -2698,10 +2702,10 @@ Ckeys in this way (but you needn't worry about doing
this by accident,
as trying has no effect). Ckeys @array in an lvalue context is a syntax
error.
-Starting with Perl 5.14, Ckeys can take a reference to an unblessed hash
-or array. The argument will be dereferenced automatically. This aspect of
-Ckeys is considered highly experimental. The exact behaviour may change
-in a future version of Perl.
+Starting with Perl 5.14, Ckeys can take a scalar EXPR, which must contain
+a reference to an unblessed hash or array. The argument will be
+dereferenced automatically. This aspect of Ckeys is considered highly
+experimental. The exact behaviour may change in a future version of Perl.
for (keys $hashref) { ... }
for (keys $obj-get_arrayref) { ... }
@@ -4369,6 +4373,8 @@ the current value of $^F (by default 2 for CSTDERR).
See Lperlvar/$^F.
=item pop ARRAY
Xpop Xstack
+=item pop EXPR
+
=item pop
Pops and returns the last value of the array, shortening the array by
@@ -4378,10 +4384,10 @@ Returns the undefined value if the array is empty,
although this may also
happen at other times. If ARRAY is omitted, pops the C@ARGV array in the
main program, but the C@_ array in subroutines, just like Cshift.
-Starting with Perl 5.14, Cpop can take a reference to an unblessed array.
-The argument will be dereferenced automatically. This aspect of Cpop is
-considered highly experimental. The exact behaviour may change in a future
-version of Perl.
+Starting with Perl 5.14, Cpop can take a scalar EXPR, which must hold a
+reference to an unblessed array. The argument will be dereferenced
+automatically. This aspect of Cpop is considered highly experimental.
+The exact behaviour may change in a future version of Perl.
=item pos SCALAR
Xpos Xmatch, position
@@ -4480,6 +4486,8 @@ describing the equivalent prototype is returned.
=item push ARRAY,LIST
Xpush Xstack
+=item push EXPR,LIST
+
Treats ARRAY as a stack, and pushes the values of LIST
onto the end of ARRAY. The length of ARRAY increases by the length of
LIST. Has the same effect as
@@ -4491,10 +4499,10 @@ LIST. Has the same effect as
but is more efficient. Returns the number of elements in the array following
the completed Cpush.
-Starting with Perl 5.14, Cpush can take a reference to an unblessed
-array. The argument will be dereferenced automatically. This aspect of
-Cpush is considered highly experimental. The exact behaviour may change
-in a future version of Perl.
+Starting with Perl 5.14, Cpush can take a scalar EXPR, which must hold a
+reference to an unblessed array. The argument will be dereferenced
+automatically. This aspect of Cpush is considered highly experimental.
+The exact behaviour may change in a future version of Perl.
=item q/STRING/
@@ -5403,6 +5411,8 @@ An example disabling Nagle's algorithm on a socket:
=item shift