in reply to Re: rebuilding a hash (more)
in thread rebuilding a hash (more)

If you use numbers as indices, you should use an array!

Not necessarily. It makes no sense to use an array if the indices of its only elements are 2, 24, and 35000. For sparse arrays, hashes are a good choice.

As for his sort problem, there are ways around it by using a smarter sort function.


Dave

Replies are listed 'Best First'.
Re: Re: Re: rebuilding a hash (more)
by Skeeve (Parson) on Feb 20, 2004 at 08:11 UTC
    > Not necessarily.

    Agreed. But as he said, he don't want to have a gap, and his code is (at least) trying to close gaps, arrays would be, to my understanding, the best choice here.