This is wonderful, however, I forgot that my data structure is setup as follows:
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($r +ec->[17])}, {COUNTRY=>$rec->[19]}, {FEMALE=>female_staff($rec->[18])}, {VACANT=>vacant_post_yellow_background($r +ec->[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' }, ];
Each group of staff members is under a group as seen in $VAR1. This line reports an error now:
push @{ $grades{$_->{GRADE}}{$_->{POSITION}} }, $_->{NAME} for @$AG; #How do I refer @$AG as it is a hash of hashes???
Thanks again.

In reply to Re^2: Counting Problem by GuiPerl
in thread Counting Problem by GuiPerl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.