use warnings; use strict; my @array_of_hash; for (1..3) { my %hash = ( 'name' => $_, 'payment' => $_, ); push @array_of_hash, \%hash; } use Data::Dumper; $Data::Dumper::Sortkeys=1; print Dumper(\@array_of_hash);