in reply to Re^5: map-like hash iterator
in thread map-like hash iterator

Why iterate over the entire 10,000,000 records even when the single one of interest is found at the very beginning? The iterators do not offer any early bailing mechanism.
False. die works just fine.
Iterators mainly offer convenience.
And this is Perl. Sounds like a perfect match.

Anyway, if you want to argue about it, let's meet in the chatterbox some time. Thank you for your comments.

Replies are listed 'Best First'.
Re^7: map-like hash iterator
by Aristotle (Chancellor) on Nov 07, 2002 at 06:58 UTC
    die works just fine.
    But how do you return the result then? Anyway.. :)

    Makeshifts last the longest.

      die can take a reference as its argument.

      But, still, I wasn't really pushing that solution. I think the first one I gave is still preferable.