in reply to Re: my array is almost a hash, but keys are not unique.
in thread my array is almost a hash, but keys are not unique.

It's true; I do eschew. Don't you?


- Boldra
  • Comment on Re^2: my array is almost a hash, but keys are not unique.

Replies are listed 'Best First'.
Re^3: my array is almost a hash, but keys are not unique.
by GrandFather (Saint) on Apr 07, 2009 at 20:20 UTC

    Indeed I do. The Perl for/foreach loop is generally much clearer than the C for loop, and is almost never bug bait (the C for loop is prone to off by 1 errors).

    It's the 'destroying the source array' part that may be more of an issue if the array is large enough that you might think twice about copying it and are into premature optimization.


    True laziness is hard work