In message <[EMAIL PROTECTED]>
          Nathan Torkington <[EMAIL PROTECTED]> wrote:

> Tom Hughes writes:
> > I must admit it had never occurred to me that somebody might
> > deliberately use keys or values to achieve that, but I guess
> > somebody might be relying on it without realising it.
>
>   while (($k,$v) = each %foo) {
>      last if ...;
>   }
>
>   keys %foo;  # reset the iterator
>
>   while (($k,$v) = each %foo) {
>       ...             # begin again from the start
>   }

Well that's not accidental, that's deliberate and is exactly the
sort of thing that it would never have occurred to me to write as
it is so bletchorous. Obviously not everybody shares my sensibilities
though ;-)

Either that or they don't realise how expensive that is if the
hash is large...

Tom

-- 
Tom Hughes ([EMAIL PROTECTED])
http://www.compton.nu/
...Troubles are like babies; they only grow by nursing.

Reply via email to