in reply to Re^4: merge with multiple row with same key
in thread merge with multiple row with same key

OK, this is a bit clearer, but we still lack information. I think that you should probably reformat the data prior to storing it into the hash.

The problem is that you don't give any clue as to how to obtain:

'abc,def' => {item1,item2,,item4 ,}
I can see that you want your array of items in a specific order and have an empty slot when an item is missing, but this is obviously dummy data, we would need to see real data to understand how to really order the elements ands how to figure out where there is supposed to be an empty slot.