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

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

Thread Previous | Thread Next
Dave Mitchell
April 3, 2013 11:16
Re: Perlfunc for each(), keys(), values() has been changed
Message ID:
On Fri, Mar 29, 2013 at 12:10:33PM -0700, Karen Etheridge wrote:
> Not just that, but one can
> 1.  remove any key at all that has just been referenced by each(), even if it
> is not the "last" key, and
> 2. remove keys in the order that they are returned by keys().

But that is just a quirk of the current implementation. The only thing
that is guaranteed is that deleting the *most recent* key returned by
scalar 'each' won't affect the iteration.

No man treats a motor car as foolishly as he treats another human being.
When the car will not go, he does not attribute its annoying behaviour to
sin, he does not say, You are a wicked motorcar, and I shall not give you
any more petrol until you go. He attempts to find out what is wrong and
set it right.
    -- Bertrand Russell,
       Has Religion Made Useful Contributions to Civilization?

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