in reply to Re^2: array within an array
in thread array within an array

This code is almost what I need, but using a count will not work (actually tried that) :). I only what the elements in @charges removed and replaced with chx if all the keys in %bundle1 are found. So that last element ch4 was replaced and it should not. This is where I am stuck.

Replies are listed 'Best First'.
Re^4: array within an array
by aartist (Pilgrim) on Oct 07, 2011 at 15:01 UTC
    You need to see if you can find all the elements before you start to replace. So you need to hold them in memory somewhere. If you reach to end of the array before finding them, just put them as it is on their respective locations.