Given this hash:
%hash = ($reportNo => {
'Type' => $Type,
'Year' => $Year,
'Link' => $Link,
'Authors' => $Authors,
'Desc' => $Description
}
);
Here's how you can iterate through it:
foreach $key (keys %hash) {
print "Key=<$key>\n";
foreach $key2 (keys %{$hash{$key}}) {
print " Key2=<$key2>, Value=<$hash{$key}{$key2}>\n";
}
}
The first foreach uses the "keys" command - the result will be that each iteration of the outer foreach will get the value of one of the keys of the %hash, which really is $reportNo. The inner foreach iterates through each of the fields (Type, Year, etc.) in the anonymous hash.
Read up on hashes - not sure what platform you're on, but on Linux I can access the Perl documentation by doing "perldoc perl" - that will give you an index of other perldoc books to look at. For example, from the "perldoc perl" I found that data structures are in the "perldata" perldoc, so to see those(which includes hashes), I did "perldoc perldata". You get the idea.
HTH.
Hardy Merrill
Mission Critical Linux, Inc.