in reply to Re^2: Insert into element into arrays refin thread Insert into element into arrays ref
for (my($k,$v)=each %{$data2->[0]}){
You may need to use while in place of for to get all the value in %{$data2->[0]}