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