while(my($k,$v)=each %{$data2->[0]}){ $_->{$k} = $v for @$data1; }