in reply to Pick any key from a very large hash

Can't you simply exit from the each when you are done, and maybe include it in an external loop of some kind?

Or have I completely missed the point?

Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."

Replies are listed 'Best First'.
Re^2: Pick any key from a very large hash
by FloydATC (Deacon) on Jul 11, 2009 at 22:24 UTC
    I tried using each without looping at all, which caused weird results when arbitrary pairs were added or deleted between each each.

    exit would be taking things a bit too far, perhaps you meant last? :-) Alternatively, if you mean use a separate process, this would defeat the DB_File built-in cache and generally kill performance.

    OR maybe I'm the one missing the point...

    -- Time flies when you don't know what you're doing