my %AG = (
'BERF - Office of Director' => [
[
{ SECTION => 'BERF' },
{ GRADE => 'D1' },
{ POSITION => 'DIRECTOR' },
{ NAME => 'D. Fool' },
]
]
);
print Dumper(%AG);
####
my $grade = $AG{'BERF - Office of Director'}[0][0]{GRADE};
####
my %AG = (
'BERF - Office of Director' => {
SECTION=>'BERF', GRADE=>'D1', POSITION=>'DIRECTOR', NAME=>'D. Fool'
}
);
####
my $grade = $AG{'BERF - Office of Director'}{GRADE};
####
my %hash = { a=>1, b=>2 };
my $ref = \%hash;
# This will give you a nice dump of your hash
print Dumper($ref);
# This will give you the same kind of dump
print Dumper(\%hash);
# This will give you a *HORRIBLE* dump:
print Dumper(%hash);
# It'll give you something like:
$VAR1 = 'a';
$VAR2 = 1;
$VAR3 = 'b';
$VAR4 = 2;