On Mon, 10 Sep 2012 20:52:41 +0800, andrew sison wrote:
> I don't get how you can actually print the contents of the subhash.

Generic hash-of-hashes iteration example:

for my $outer_key ( keys %hash )
{
  print "Outer key: $outer_key:\n";
  for my $inner_key ( sort keys %{ $hash{$outer_key} } )
  {
    print "\t$inner_key: $hash{$outer_key}{$inner_key}\n";
  }
}

-- 
Peter Scott
http://www.perlmedic.com/     http://www.perldebugged.com/
http://www.informit.com/store/product.aspx?isbn=0137001274
http://www.oreillyschool.com/certificates/perl-programming.php

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to