From 6731d7809d32aef41371e68ede3913232555758c Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 16 Mar 2016 23:40:33 +0100 Subject: [PATCH] count ContributionType --- star2016-abstracts.pl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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); -- 2.20.1