From: Dobrica Pavlinusic Date: Wed, 16 Mar 2016 22:40:33 +0000 (+0100) Subject: count ContributionType X-Git-Url: http://git.rot13.org/?p=star2016;a=commitdiff_plain;h=6731d7809d32aef41371e68ede3913232555758c count ContributionType --- diff --git a/star2016-abstracts.pl b/star2016-abstracts.pl index bda55b1..2d872c3 100755 --- a/star2016-abstracts.pl +++ b/star2016-abstracts.pl @@ -7,5 +7,19 @@ use Data::Dump qw(dump); my $tpp = XML::TreePP->new(); my $tree = $tpp->parsefile( "abstracts.xml" ); -print dump($tree); +my $abstracts = delete $tree->{AbstractBook}->{abstract}; +warn "# tree = ", dump($tree); + +my $stat; + +foreach my $abstract ( @$abstracts ) { + warn "# abstract = ", dump($abstract); + + foreach $k (qw( ContributionType )) { + $stat->{$k}->{ $abstract->{$k} } ++; + } + +} + +warn "# stat = ",dump($stat);