in reply to Hash keyed on ranges

If the ranges tend to be short, this would be pretty simple and efficient:
--$num_to_look_for until(exists $hash{$num_to_look_for});


When's the last time you used duct tape on a duct? --Larry Wall

Replies are listed 'Best First'.
Re: Re: Hash keyed on ranges
by ViceRaid (Chaplain) on May 07, 2004 at 13:10 UTC

    ++ Thanks, I really like this suggestion. Much of the time the ranges tend to be short - perhaps around 50 to 100 wide. However, sometimes they might up to several thousand wide, as they might be representing multiple pages-worth of english text. I'll give it a whirl on some real examples.