develooper Front page | perl.perl5.porters | Postings from March 2013

Re: Perlfunc for each(), keys(), values() has been changed

Thread Previous | Thread Next
Brad Baxter
March 29, 2013 19:30
Re: Perlfunc for each(), keys(), values() has been changed
Message ID:
On Fri, Mar 29, 2013 at 2:16 PM, Aristotle Pagaltzis <>wrote:

> * Lukas Mai <> [2013-03-29 18:15]:
> > This bit ("or C<keys>") makes no sense: 'keys' always returns
> > a complete snapshot of the current keys. What does it mean for a key
> > to be most recently returned from 'keys'?
> The claim is from Yves’ text; I could not easily disprove it on the
> older perls I have and did not compile blead to be sure. That is a very
> minor point in the whole of my proposed text; it is a two-word deletion
> that will not affect anything else.
> * Brad Baxter <> [2013-03-29 18:20]:
> > In the spirit of guidance on what to do, I think including the
> > examples below to help understand "the entry most recently returned
> > from C<each> or C<keys>" (particularly keys) would be helpful.
> The `each` POD has such an example already. Do you feel that clarity
> requires it to be repeated here?

No.  Nevermind.  :-)  I was simply confused by the "most recently returned
from 'keys'" phrase, and the longer I stare at the keys example the less I
feel it helps that confusion.  What I think I'm hearing is that as long as
I delete entries from a hash in the order returned by keys, then the
*remaining* entries keep the same order they had before I deleted anything.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About