my $Rec = [ {PWD=>posts_outside_pwd($rec->[5])}, {SECTION=>$rec->[14]}, {ORG_LEVEL_DESCRIP=>$rec->[10]}, {GRADE=>strip_hyphen($rec->[15])}, {POSITION=>$rec->[2]}, {NAME=>invert_name($rec->[16])}, {AGE=>convert_date_to_age(trim($rec->[17]))}, {DATE_OF_BIRTH=>date_of_birth_cleansed($rec->[17])}, {COUNTRY=>$rec->[19]}, {FEMALE=>female_staff($rec->[18])}, {VACANT=>vacant_post_yellow_background($rec->[16])}, {GRADE_NUMS=>map{++$positions{$_}}$rec->[15]." ".$rec->[16]." ".$rec->[2]}, ]; push @{$AG{$rec->[10]}},$Rec; $VAR1 = 'BERF - Office of Director'; $VAR2 = [ [ { 'SECTION' => 'BERF' }, 'GRADE' => 'D1' }, { 'POSITION' => 'DIRECTOR' }, { 'NAME' => 'D. Fool' }, ]; #### push @{ $grades{$_->{GRADE}}{$_->{POSITION}} }, $_->{NAME} for @$AG; #How do I refer @$AG as it is a hash of hashes???