On Jun 18, Christine Lenda said:

>%classes=(
>       "Math" => { "Joan" => 95,
>                   "John" => 70,
>                   "Jane" => 50 },
>       "Science" => { "Joan" => 80,
>                      "John" => 90,
>                      "Jane" => 80 },
>);
>
>I can print out individual values, but I'd like to
>display all key/value pairs.

You'll want to make a recursive function, for the general case, but if you
know your structure is this, you can do:

  for my $subj (keys %classes) {
    for my $who (keys %{ $classes{$subj} }) {
      print "$subj $who => $classes{$subj}{$who}\n";
    }
  }

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
I am Marillion, the wielder of Ringril, known as Hesinaur, the Winter-Sun.
Are you a Monk?  http://www.perlmonks.com/     http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc.     http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter.         Brother #734
**      Manning Publications, Co, is publishing my Perl Regex book      **

Reply via email to