my %final_hash = map { $_->{key} => $_->{value} } @data_list; #verify the output use Data::Dumper; print Dumper \%final_hash;