#!/usr/bin/perl -w use strict; use Data::Dump qw(pp); my %playerHoH = ( Bennie => { deaths => 1, kills => 13 }, Bob => { deaths => 12, kills => 15 }, Jane => { deaths => 0, kills => 30 }, mary => { deaths => 4, kills => 20 }, ); my @AoH; foreach my $name (sort keys %playerHoH) { # the {} means allocate memory for a new anon hash # it is populated and a reference to that anon hash # is pushed on to the @AoH. push @AoH, { name => $name, deaths=> $playerHoH{$name}{deaths}, kills => $playerHoH{$name}{kills} }; } print '@AoH=' ,pp(\@AoH), "\n"; __END__ prints: @AoH=[ { deaths => 1, kills => 13, name => "Bennie" }, { deaths => 12, kills => 15, name => "Bob" }, { deaths => 0, kills => 30, name => "Jane" }, { deaths => 4, kills => 20, name => "mary" }, ]