in reply to Print attributes from two tags together

What I want is to print each MergeHistory rsId and buildId together as the following:

What has to happen for you to be able to do that?

You have to keep a stack of rsids and buildids

so

my @rsids; my @buildids; my $twig = ... 'Rs/MergeHistory' => sub { my $rsid = ...; my $buid = ...; push @rsids, $rsid; push @buildids, $buid; }, ... print $out join(',',@rsids), "\t",join(',',@buildids), "\n";

or

my @merges; my $twig = ... 'Rs/MergeHistory' => sub { my $rsid = ...; my $buid = ...; push @merges, [ $rsid, $buid ]; }, ... print $out join(',', map { $_->[0] } @merges ), "\t",join(',',map { $_->[1] } @merges ), "\n";

Replies are listed 'Best First'.
Re^2: Print attributes from two tags together
by AhmedABdo (Acolyte) on Sep 25, 2015 at 21:33 UTC
    Thanks for your answer, but what does these dots means?
      That's the famous "exercise for the reader", they are the blanks where you have to fill in (e.g. parts from your original code). Other people might call it the homework he assigned to you ;-)

      Update: see also perlsyn