foreach my $element( @record_time){ $each_record{'time'} = $element; push @store_all_data, \%each_record; } #### push @store_all_data, {%each_record}