in reply to Re: question about multi value hash key
in thread question about multi value hash key
#!/usr/bin/perl use warnings; use strict; my %conf_table = ( 1 => { conference1 => { type => q{type1}, comment => q{comment1}, }, conference2 => { type => q{type2}, comment => q{comment2}, }, }, 2 => { conference3 => { type => q{type1}, comment => q{comment3}, }, conference4 => { type => q{type2}, comment => q{comment4}, }, }, ); for my $time (keys %conf_table){ print qq{time: $time\n}; for my $cnf (keys %{$conf_table{$time}}){ print qq{\tconference: $cnf\n}; print qq{\t\ttype: $conf_table{$time}{$cnf}{type}\n}; print qq{\t\tcomment: $conf_table{$time}{$cnf}{comment}\n}; } }
time: 1 conference: conference1 type: type1 comment: comment1 conference: conference2 type: type2 comment: comment2 time: 2 conference: conference4 type: type2 comment: comment4 conference: conference3 type: type1 comment: comment3
|
|---|