On 8/27/09 Thu Aug 27, 2009 10:42 AM, "Ian" <[email protected]> scribbled:
> Pure beginners question.
>
> I'm creating a hash of arrays like this :
>
> $ihash{$3}{$1} = [...@itab];
>
> For now I was able to get the data using Dumper but I need to create a
> "pretty" report.
>
> How do I loop over this hash/hash of arrays to print it out?
Something like this:
for my $key1 ( sort keys %ihash ) {
for my $key2 ( sort keys %{$ihash{$key1}} ) {
for my $element ( @{$ihash{$key1}->{$key2}} ) {
printf " %10s %10s %s\n", $key1, $key2, $element;
}
}
}
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/