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

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

Thread Previous | Thread Next
From:
Brad Baxter
Date:
March 29, 2013 19:30
Subject:
Re: Perlfunc for each(), keys(), values() has been changed
Message ID:
CANBtU9ZFJamnAVv8yi1Wm07hg+=dkWpyJqdx5=+KR6=VXzRP-Q@mail.gmail.com
On Fri, Mar 29, 2013 at 2:16 PM, Aristotle Pagaltzis <pagaltzis@gmx.de>wrote:

> * Lukas Mai <plokinom@gmail.com> [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 <bmb@mail.libs.uga.edu> [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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About