in reply to Joining an array

An idea, if you construct the array in the first place: Maybe you should consider using a hash instead of an array. Makes this problem much more easy.

Replies are listed 'Best First'.
Re^2: Joining an array
by tangent (Parson) on Feb 11, 2012 at 20:55 UTC
    Yes I am using a hash at the moment and it works fine. But as my dataset has grown performance has become an issue, and I notice I am constantly looping over hashes and arrays. EDIT: looking again I see am using both a hash and an array - the array purely to keep the order.
Re^2: Joining an array
by JavaFan (Canon) on Feb 12, 2012 at 10:51 UTC
    The OP said he wants to preserver order. How do you suggest to do that using a hash, which considering the efficiency request from the OP?