push @TestVals, { A => $var1, B => $var2, C => $var3, D => $var4 } foreach my $row (@TestVals){ print Dumper $row; }