my @newfields = (); foreach $field (@fields){ get_values(); my %nf_row_data; $nf_row_data{FIELD} = $_; push(@field_data, \%nf_row_data); }