in reply to Re: How keep the count...
in thread How keep the count...

Thanks, I am going to try that, but in case I need to retrieve those sentences where the offset was 3, I need a hash eh?

Replies are listed 'Best First'.
Re: Re: Re: How keep the count...
by matija (Priest) on Mar 03, 2004 at 22:35 UTC
    No, you don't need a hash for that either. You can have another array, which will contain the number of the sentence in which the offset was found.

    Or, if you absolutely insist on using hashes, you could, instead of two arrays, use an array of hashes, where each element of an array would be a hash, with two keys: offset and sentence_number.