- or download this
my $twig= XML::Twig->new( twig_roots => { Hit_num => 1 } );
$twig->parsefile( $file);
my @hit_nums= $twig->root->children;
# do stuff with the Hit_num's
- or download this
my $twig= XML::Twig->new( twig_roots => { Hit_num => \&hit_num } );
$twig->parsefile( $file);
...
# to keep the hit_num around
}
- or download this
my $twig= XML::Twig->new( twig_roots => { Hit_num => sub { hit_num( @_
+, $state_info); } } );
# ...
sub hit_num
{ my( $t, $hit_num, $state_info)= @_;